You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adopt the proposed authIssuers API from microsoft/vscode#337846 so GitHub Enterprise requests use the deployment identified by the selected authentication session, not github-enterprise.uri.
Derive REST/GraphQL endpoints from AuthenticationSession.authorizationServer, removing /login/oauth and preserving GHES/GHE.com mapping, deployment paths, and ports.
Keep issuer/token pairing through client reuse and scope upgrades; match repositories and host-specific caches to the selected deployment. Report missing enterprise provenance explicitly.
Preserve enterprise setup UI and public/PAT authentication. Enable authIssuers and require VS Code 1.140.0.
This is consumer adoption only: no multiple-host setting, provider, picker, or general authentication refactor. Production proposal allowlisting is handled separately in microsoft/vscode-distro; the API remains proposed.
Validation
Full desktop extension, browser extension, and webview compilation passed.
141 focused mocked extension-host tests passed, including host B with host A configured, REST/GraphQL routing, public authentication, session changes, scope upgrades, and cache isolation.
npm run lint, npm run hygiene, and CRLF-aware diff checks passed.
Tests used isolated profiles and mocked authentication/network boundaries; no live authenticated network testing.
Unrelated local lockfile and API-declaration updates are excluded.
Adopt the proposed authIssuers API so enterprise clients, scope upgrades, and host caches follow the selected authentication session instead of github-enterprise.uri. Preserve enterprise setup UI and public authentication behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
For an issuer such as https://host:8443/deployment/login/oauth, serverUri includes /deployment, but getIssueOrURLExpression only incorporates enterpriseUri.authority. A closing issue URL like /deployment/owner/repo/issues/12 is therefore parsed with owner deployment/owner, and URLs from another deployment on the same authority also match. Update the expression to include the escaped deployment path before the owner/repository capture, with coverage for both matching and mismatched deployment paths.
const unavailable = () => new AuthenticationError(vscode.l10n.t('GitHub Enterprise is unavailable because the authentication session does not include a supported authorization server. Use a VS Code build with authIssuers session support and sign in again.'));
The reason will be displayed to describe this comment to others. Learn more.
result.canceled || result.unavailable is also evaluated on line 502. To make it clearer what's being evaluated it would be good to put this into a const.
The reason will be displayed to describe this comment to others. Learn more.
Are these changes actually needed to suppor the issuer?
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
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
Adopt the proposed
authIssuersAPI from microsoft/vscode#337846 so GitHub Enterprise requests use the deployment identified by the selected authentication session, notgithub-enterprise.uri.AuthenticationSession.authorizationServer, removing/login/oauthand preserving GHES/GHE.com mapping, deployment paths, and ports.authIssuersand require VS Code 1.140.0.This is consumer adoption only: no multiple-host setting, provider, picker, or general authentication refactor. Production proposal allowlisting is handled separately in
microsoft/vscode-distro; the API remains proposed.Validation
npm run lint,npm run hygiene, and CRLF-aware diff checks passed.Unrelated local lockfile and API-declaration updates are excluded.
Fixes #8985