Normalize configured GitHub host names - #178
Closed
dipeshbabu wants to merge 1 commit into
Closed
Conversation
Collaborator
|
Thanks for digging into this and for putting together the test. We took a closer look, and the mixed-case |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
github.comuse the public GitHub API instead of the Enterprise/api/v3baseGitHub.COMRoot cause
GitHub hostnames are case-insensitive, but the discovery path compared the configured value to lowercase
github.comwith a case-sensitive string check. A valid value such asGH_HOST=GitHub.comwas therefore treated as GitHub Enterprise and produced the wrong API base URL.Impact
Case variants of public and Enterprise GitHub hostnames now resolve consistently. Existing lowercase configurations are unchanged.
Overlap check
Repository-wide issue and pull-request searches were run for
GH_HOST, GitHub host casing, and the incorrectapi/v3public API path. No active or closed issue or pull request overlaps this fix.Validation
pnpm dlx bun test --timeout 30000 ./tests-ts/bulk-scan-discovery.test.ts— 11 passedpnpm exec tsc --noEmitpnpm exec prettier --check src/bulk-scan-discovery.ts tests-ts/bulk-scan-discovery.test.tsgit diff --check