-
Notifications
You must be signed in to change notification settings - Fork 7
Support for Github enterprise URLs #5
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
base: main
Are you sure you want to change the base?
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.
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? 🤔
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
|
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