github-build icon indicating copy to clipboard operation
github-build copied to clipboard

Add support for Github Enterprise

Open germanattanasio opened this issue 8 years ago • 12 comments

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.

germanattanasio avatar Jul 03 '17 18:07 germanattanasio

Ah, sure thing.

siddharthkp avatar Jul 03 '17 19:07 siddharthkp

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}`,

dylang avatar Jul 24 '17 17:07 dylang

@dylang That would be great!

siddharthkp avatar Jul 24 '17 17:07 siddharthkp

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.

dylang avatar Aug 01 '17 14:08 dylang

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

siddharthkp avatar Aug 02 '17 12:08 siddharthkp

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?

rahulgandhi avatar Aug 27 '17 12:08 rahulgandhi

@rahulgandhi Sounds good!

siddharthkp avatar Aug 27 '17 15:08 siddharthkp

@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.

Aghassi avatar Aug 09 '18 21:08 Aghassi

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

Soon, hopefully?

siddharthkp avatar Aug 10 '18 06:08 siddharthkp

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

JimmyMultani avatar May 12 '20 18:05 JimmyMultani

@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

siddharthkp avatar May 12 '20 20:05 siddharthkp

bump Any updates on this @siddharthkp ?

skube avatar Jun 01 '20 18:06 skube