Skip to content

Conversation

@rahulgandhi
Copy link

@rahulgandhi rahulgandhi commented Aug 28, 2017

This PR fixes #3 and also siddharthkp/bundlesize#95.

I have tested it on my Github enterprise account.

Once we release this, I'll update github-build version on bundlesize

@rahulgandhi
Copy link
Author

I think it is failing because I don't have a key for the account the test is written for. The test depends on process.env.github_token which I don't have for this repo.

@rahulgandhi
Copy link
Author

@siddharthkp Can you have a look?

@jmccann
Copy link

jmccann commented Jun 6, 2018

@siddharthkp We gave this patch a try and it seems to be working. Any chances on getting this merged? If you need/want some updates let me know and we can work through it. Thanks!!!!

axios({
method: 'POST',
url: `https://api.github.com/repos/${build.repo}/statuses/${build.sha}`,
url: `${build.ghe ? `${build.ghe}/api/v3` : default_git_url }/repos/${build.repo}/statuses/${build.sha}`,
Copy link
Owner

Choose a reason for hiding this comment

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

Where does ghe come from? 🤔

Copy link

Choose a reason for hiding this comment

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

@rahulgandhi can you respond to this?

Choose a reason for hiding this comment

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

Well, I think ghe comes from Build instance meta.

E.g.:

const data = {
  ...
  ghe: '...',
}

/* Create a build */
const build = new Build(data)

Although, IMAO ghe is not obvious. Maybe ghEnterpriseUrl?

Copy link

Choose a reason for hiding this comment

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

Agree, one should be allowed to configure the entire thing. In other projects i've seen them separated out as:

GH_PREFIX and GH_URL (as env vars, for example). Makes for easier separate consumption.

GH_PREFIX being /api/v3 and GH_URL being https://github.mydomain.com

Choose a reason for hiding this comment

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

Hey @rahulgandhi, do you have time to update this?

@rahulgandhi
Copy link
Author

I'm up for making any modifications to this PR if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Github Enterprise

6 participants