Skip to content

Github Pull Request tab won't open if branch names are reused #8007

@andydam

Description

@andydam

Github Pull Request tab won't open if branch names are reused across PRs. Looks like some matching is done from branch names and it will match an old PR and pull its status.

GitHub Pull Request extension output:

2025-10-15 15:14:31.757 [info] [Review+0] Switch to Pull Request #1777 - start
2025-10-15 15:14:31.768 [info] [PullRequestGitHelper] Fetch tracked branch refs/remotes/origin/<branch-name>
2025-10-15 15:14:34.746 [info] [PullRequestGitHelper] associate <branch-name> with Pull Request #1777
2025-10-15 15:14:34.815 [info] [Review+0] Switch to Pull Request #1777 - done
2025-10-15 15:14:34.815 [info] [Review+0] Validate state in progress
2025-10-15 15:14:34.815 [info] [Review+0] Validating state...
2025-10-15 15:14:34.817 [info] [FolderRepositoryManager+0] Found GitHub remote for folder /Users/andy/Projects/<repo-name>
2025-10-15 15:14:34.818 [info] [FolderRepositoryManager+0] Using in-memory cached assignable users.
2025-10-15 15:14:34.829 [info] [Review+0] Found matching pull request metadata for current branch <branch-name>. Repo: <repo-name> PR: 1340
2025-10-15 15:14:34.829 [info] [Review+0] current branch <branch-name> is associated with pull request #1340
2025-10-15 15:14:34.829 [info] [Review+0] Resolving pull request
2025-10-15 15:14:34.829 [info] [FolderRepositoryManager+0] Found GitHub repo for pr #1340: yes
2025-10-15 15:14:35.394 [info] [FolderRepositoryManager+0] Found GitHub pr repo for pr #1340: yes
2025-10-15 15:14:35.394 [info] [GitHubRepository+0] Fetch branch main - enter
2025-10-15 15:14:35.804 [info] [GitHubRepository+0] Fetch branch main - done: true
2025-10-15 15:14:35.805 [info] [Review+0] Resolved PR #1340, state is MERGED
2025-10-15 15:14:36.528 [info] [Review+0] Found matching pull request metadata on GitHub for current branch <branch-name>. Repo: <repo-name> PR: 1340
2025-10-15 15:14:36.528 [info] [PullRequestGitHelper] associate <branch-name> with Pull Request #1340
2025-10-15 15:14:36.617 [info] [Review+0] This PR is merged
  • Extension version: 0.120.0
  • VSCode Version: 1.105.1 (Universal)
  • OS: macOS 15.7.1 (24G231)
  • Repository Clone Configuration (single repository/fork of an upstream repository):
  • GitHub Product (GitHub.com/GitHub Enterprise version x.x.x):

Steps to Reproduce:

  1. Create a branch
  2. Open a PR
  3. Open the PR in VSCode
  4. Observe extension working fine
  5. Merge that PR
  6. Delete the branch
  7. Create a branch with the same branch name as step 1
  8. Open a PR
  9. Open the PR in VSCode
  10. Observe Github Pull Request tab not showing up and similar console output as above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions