Route GHE.com remotes through enterprise authentication - #8870
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix repo-scoped queries showing zero in PR panel
Route GHE.com remotes through enterprise authentication
Jul 31, 2026
Alex Ross (alexr00)
marked this pull request as ready for review
August 11, 2026 11:00
Alex Ross (alexr00)
approved these changes
Aug 11, 2026
Alex Ross (alexr00)
approved these changes
Aug 11, 2026
Alex Ross (alexr00)
enabled auto-merge (squash)
August 11, 2026 11:00
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes authentication misbinding for *.ghe.com (and other Enterprise-classified) remotes by routing them through the Enterprise authentication provider based on server-type classification rather than a strict URI-authority match, preventing repo-scoped queries from failing and the PR view from appearing empty.
Changes:
- Derives
GitHubRemote.authProviderIdfromGitHubServerType(Enterprise →github-enterprise, GitHub.com →github, otherwise fallback to existing URI-based behavior). - Adds debug logging to record each remote’s server classification and chosen auth provider.
- Adds regression tests covering Enterprise vs GitHub.com auth-provider selection.
Show a summary per file
| File | Description |
|---|---|
| src/common/remote.ts | Overrides GitHubRemote.authProviderId based on server classification and logs the chosen auth provider per remote. |
| src/test/common/remote.test.ts | Adds regression tests asserting auth-provider selection for Enterprise and GitHub.com remotes. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
Don Jayamanne (DonJayamanne)
approved these changes
Aug 11, 2026
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.
GHE.com remotes could be classified as Enterprise but still use the GitHub.com authentication provider, causing repository queries to fail and the PR panel to appear empty.
Changes
GitHubRemote.authProviderIdfrom its detected server type: