Skip to content
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

Use correct URL for GitHub Enterprise #6497

Merged
merged 1 commit into from
May 10, 2022

Conversation

danielfullmer
Copy link
Contributor

For GitHub Enterprise, the API is accessed through a slightly different
URL. See [1], where it says:

Use http(s)://[hostname]/api/v3 to access the API for GitHub
Enterprise Server.

Also tested working on a GHE instance.

[1] https://docs.github.com/en/enterprise-server@3.3/rest/guides/getting-started-with-the-rest-api

src/libfetchers/github.cc Outdated Show resolved Hide resolved
For GitHub Enterprise, the API is accessed through a slightly different
URL. See [1], where it says:

> Use http(s)://[hostname]/api/v3 to access the API for GitHub
> Enterprise Server.

Also tested working on a GHE instance.

[1] https://docs.github.com/en/enterprise-server@3.3/rest/guides/getting-started-with-the-rest-api
@roberth
Copy link
Member

roberth commented May 9, 2022

👍 this matches the logic I'm using in Hercules CI.

I'd turn it into a function that returns the api base url, but that may be overkill until we have more api usages. Whether we want more api usages is questionable anyway because of the unauthenticated rate limits that make it unusable on office networks.

@edolstra edolstra merged commit eb957ad into NixOS:master May 10, 2022
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.

3 participants