Support for Github enterprise URLs#5
Conversation
|
I think it is failing because I don't have a key for the account the test is written for. The test depends on |
|
@siddharthkp Can you have a look? |
|
@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}`, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Hey @rahulgandhi, do you have time to update this?
|
I'm up for making any modifications to this PR if needed. |
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-buildversion onbundlesize