From 95c7bca3236907ae3ea6adef8e35a578dd93a3bb Mon Sep 17 00:00:00 2001 From: swapnil mishra Date: Sat, 4 Nov 2017 00:12:33 +0100 Subject: [PATCH 1/2] Don't show github message in gitlab CI --- src/api.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api.js b/src/api.js index 13e76fd9..a35d277c 100644 --- a/src/api.js +++ b/src/api.js @@ -12,11 +12,13 @@ let enabled = false if (repo && token) enabled = true else if (ci) { - warn(`github token not found + if (ci !== 'gitlab') { + warn(`github token not found You are missing out on some cool features. Read more here: https://github.com/siddharthkp/bundlesize#2-build-status `) + } } debug('api enabled', enabled) From 270cfa19641484c3d17485888d33ff480c0a9813 Mon Sep 17 00:00:00 2001 From: Swapnil Mishra Date: Sun, 5 Nov 2017 13:51:55 +0100 Subject: [PATCH 2/2] Use platform variable to differentiate between github, gitlab, bitbucket etc. --- src/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api.js b/src/api.js index a35d277c..2c06cfec 100644 --- a/src/api.js +++ b/src/api.js @@ -1,6 +1,6 @@ const axios = require('axios') let { repo } = require('ci-env') -const { sha, ci } = require('ci-env') +const { sha, ci, platform } = require('ci-env') const { warn } = require('prettycli') const token = require('./token') @@ -12,7 +12,7 @@ let enabled = false if (repo && token) enabled = true else if (ci) { - if (ci !== 'gitlab') { + if (platform === 'github') { warn(`github token not found You are missing out on some cool features.