Skip to content

Route GHE.com remotes through enterprise authentication - #8870

Merged
Alex Ross (alexr00) merged 3 commits into
mainfrom
copilot/fix-ghe-data-residency-issue
Aug 11, 2026
Merged

Route GHE.com remotes through enterprise authentication#8870
Alex Ross (alexr00) merged 3 commits into
mainfrom
copilot/fix-ghe-data-residency-issue

Conversation

Copilot AI commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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

  • Derive GitHubRemote.authProviderId from its detected server type:
    Enterprise    github-enterprise
    GitHubDotCom  github
    None          existing URI-based fallback
  • Log each remote’s server classification and selected authentication provider.
  • Add regression coverage for Enterprise and GitHub.com remotes.

@azure-pipelines

Copy link
Copy Markdown
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
@alexr00
Alex Ross (alexr00) marked this pull request as ready for review August 11, 2026 11:00
Copilot AI lite review requested due to automatic review settings August 11, 2026 11:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.authProviderId from GitHubServerType (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

@alexr00
Alex Ross (alexr00) merged commit f038214 into main Aug 11, 2026
8 checks passed
@alexr00
Alex Ross (alexr00) deleted the copilot/fix-ghe-data-residency-issue branch August 11, 2026 13:52
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.

GHE.com data residency: repo-scoped queries bound to github.com provider — PR panel shows 0 in all categories (clean-profile repro included)

4 participants