siddharthkp / github-build

Github builds for CI
MIT License
133 stars 7 forks source link

Add support for Github Enterprise #3

Open germanattanasio opened 7 years ago

germanattanasio commented 7 years ago

I'm trying to use https://github.com/siddharthkp/bundlesize which depends on this library in Github Enterprise.

Looking at the code

    url: `https://api.github.com/repos/${build.repo}/statuses/${build.sha}`,

Should be(in my case):

    url: `https://github.ibm.com/api/v3/repos/${build.repo}/statuses/${build.sha}`,

You can probably accept another parameter in the constructor with the GitHub API URL. I have also seen people using environment variables like: GITHUB_API.

Thanks for the great work you are doing.

siddharthkp commented 7 years ago

Ah, sure thing.

dylang commented 7 years ago

I'm looking for enterprise support as well, would you be interested in a PR?

Might be as simple as providing a url option that defaults to https://api.github.com and

url: `${build.ghe ? `${build.ghe}/api/v3/` : 'https://api.github.com/'}repos/${build.repo}/statuses/${build.sha}`,
siddharthkp commented 7 years ago

@dylang That would be great!

dylang commented 7 years ago

Hi @siddharthkp, I ended up just re-building this from scratch, but the above change might be all that is necessary if you want to make a PR.

siddharthkp commented 7 years ago

@dylang Great, would you like to submit a pull request? I don't have a way of testing this 😞

rahulgandhi commented 7 years ago

I can take this up. This would also fix https://github.com/siddharthkp/bundlesize/issues/95 I believe. @dylang's solution looks good to me.

Do we need something else or should I get started on this?

siddharthkp commented 7 years ago

@rahulgandhi Sounds good!

Aghassi commented 6 years ago

@siddharthkp Has there been any movement on this? Would love to see this closed and useable https://github.com/siddharthkp/bundlesize/issues/95 😄 . If there is anything I can do please let me know.

siddharthkp commented 6 years ago

I don't have time to work on this right now 😢

Soon, hopefully?

JimmyMultani commented 4 years ago

@siddharthkp I'd like to take this up, if you're good with that.

siddharthkp commented 4 years ago

@JimmyMultani there's a PR for this: https://github.com/siddharthkp/github-build/pull/5

I don't have any experience with GitHub enterprise to be able to help, If you'd like you can take it forward

skube commented 4 years ago

bump Any updates on this @siddharthkp ?