Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitlab CI support #180

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ let enabled = false

if (repo && token) enabled = true
else if (ci) {
warn(`github token not found
if (ci !== 'gitlab') {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why specifically gitlab?

CI === github makes more sense to me

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually ci variable never takes the value as github its values are travis, circle etc (referring to this file). This is because while github doesn't have a platform CI, gitlab it has CI also built into it. Please correct me in case I have understood it wrong.

Might have to to introduce a platform variable in ci-envmodule which would denote the platform on which the code is hosted and based on whether its value is github or gitlab.

Copy link
Owner

@siddharthkp siddharthkp Nov 5, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding plaform makes the most sense to me 😄

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I shall make that change soon 😊

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)
Expand Down