Resolve insteadOf URL aliases in remaining remote-parsing call sites#8754
Draft
Copilot wants to merge 2 commits into
Draft
Resolve insteadOf URL aliases in remaining remote-parsing call sites#8754Copilot wants to merge 2 commits into
insteadOf URL aliases in remaining remote-parsing call sites#8754Copilot wants to merge 2 commits into
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix extension stuck on configuring remotes with global 'url aliasing'
Resolve May 19, 2026
insteadOf URL aliases in remaining remote-parsing call sites
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.
With a global git config like
url.https://github.abc.com/.insteadOf=github:,git clone github:org/repoleavesgithub:org/repoas the literal remote URL. The extension would fail to recognize the host and get stuck configuring remotes.resolveGitUrl+parseRepositoryRemotesAsync(which applyurl.<base>.insteadOfsubstitutions before parsing) already existed, but only two call sites inFolderRepositoryManagerhad been migrated. Several other paths still used the syncparseRepositoryRemotesand silently dropped aliased remotes.Changes
folderRepositoryManager.ts—createGitHubRepositoryFromOwnerNamenow awaitsparseRepositoryRemotesAsync; dropped the now-unused sync import.stateManager.ts—setIssueDatauses the async variant for enterprise-remote detection (affects which auth provider is selected for issue queries).pullRequestGitHelper.ts—createRemoteandgetUniqueRemoteName(promoted toasync, sole caller already awaited) use the async variant, so PR-checkout's dedup and unique-name logic sees aliased remotes.src/test/common/remote.test.ts— new unit tests covering basicinsteadOfsubstitution, longest-prefix selection on overlapping aliases, and the no-match passthrough.Intentionally not migrated
ReviewManagerstate-change comparison andPostCommitCommandsProvider.getCommandsremain on the sync variant — both are synchronous VS Code API surfaces and neither is on the failing setup path; switching them would require larger refactors for no user-visible benefit here.Note
This is an extension-side mitigation for the underlying upstream gap tracked at microsoft/vscode#174941; if the git extension begins surfacing the resolved URL directly, the
resolveGitUrlhelper can be retired.