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

Treat GHES hosted sources as github sources #4335

Merged
merged 1 commit into from
Oct 29, 2021
Merged

Treat GHES hosted sources as github sources #4335

merged 1 commit into from
Oct 29, 2021

Conversation

jurre
Copy link
Member

@jurre jurre commented Oct 20, 2021

When a dependency is hosted on GHES, previously it was not treated as a
GitHub source, meaning that we would not check for releases/changelogs
etc when requesting Metadata for the PR.

This fixes that, by first parsing the URL, and then making a request to
<host>/status, and checking for a X-GitHub-Request-Id header, which
we return from GitHub Enterprise Server.

@jurre jurre requested a review from a team as a code owner October 20, 2021 14:56
Copy link
Contributor

@brrygrdn brrygrdn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻 I like this approach, especially using the header as verification 🚀

@jurre
Copy link
Member Author

jurre commented Oct 20, 2021

I need to fix up a bunch of tests that now attempt to check if the unknown host is GHES, on it 👍

When a dependency is hosted on GHES, previously it was not treated as a
GitHub source, meaning that we would not check for releases/changelogs
etc when requesting Metadata for the PR.

This fixes that, by first parsing the URL, and then making a request to
`<host>/status`, and checking for a `X-GitHub-Request-Id` header, which
we return from GitHub Enterprise Server.
@jurre jurre merged commit 893850e into main Oct 29, 2021
@jurre jurre deleted the jurre/ghes-host branch October 29, 2021 14:15
@brrygrdn brrygrdn mentioned this pull request Nov 2, 2021
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.

2 participants