Repository navigation
Check stack eligibility in the base repository when the fork has a different name - #9149
Draft
Alex Ross (alexr00) with Copilot wants to merge 2 commits into
Draft
Alex Ross (alexr00) with Copilot wants to merge 2 commits into
Alex Ross (alexr00) with Copilot wants to merge 2 commits into
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 repeated stack eligibility warning when creating PRs
Check stack eligibility in the base repository when the fork has a different name
Nov 2, 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.
Creating a PR from a fork whose name differs from the base repo (e.g.
me/microsoft-vscode→microsoft/vscode) shows "Unable to check pull request stack eligibility: Unable to find the selected base repository." on every PR.CreatePullRequestDataModelheld onerepositoryName, which is the compare (fork) repo's name. The stack check also used it as the base repo's name, so it looked upmicrosoft/microsoft-vscode. That lookup 404s. The missing repo is then cached as inaccessible, so every later check fails immediately and warns again.Changes
CreatePullRequestDataModelbaseRepositoryName, which fires a change event when it changes.repositoryName, so callers that don't pass it keep their old behavior (e.g.pr.generateTitleAndDescription).CreatePullRequestHelper: seedsbaseRepositoryNamefrompullRequestDefaults.repo.CreatePullRequestViewProviderbaseRepositoryNameupdated when the base is detected or picked:onBaseBranchDetectednow receives the full baseRemoteInfoinstead of just the owner;processRemoteAndBranchResultsets it.baseRepositoryNamefor every stack eligibility check:onDidChangehandler;setDefaultCompareBranch;processRemoteAndBranchResult.onDidChangehandler also uses it to find the base remote it sends to the webview. A change tobaseRepositoryNamealone now triggers that lookup too.Tests
Four new tests in
createPRViewProvider.test.tsset up a forkfork/test-forkofgithub/test. Each covers one path that checks stacks and asserts that the lookup targets the base repo and no warning is shown.Not addressed
These spots still look up the base repo by the fork's name or owner. They don't cause this warning, so they are left for a follow-up:
getBaseRemote/getBaseGitHubRepogetLabelOptionsrepo:valuemergeQueueMethodForBranchfindIssueContextbaseRemoteNamelookup