microsoft / microsoft/vscode-pull-request-github

Closed PRs get associated with new branches of the same name

Open
#6,711 3 comments 1 reaction 1 assignee View on GitHub

@alexr00 is already working on this.

Since May 7, 2025.

bug
Dominant language
TypeScript
Stars
2.6k
Forks
795
Avg merge
1d 4h
Merged PRs (30d)
46

Description

Sometimes, when I create a branch, I will find it becomes associated with a wrong PR that was previously closed and used the same branch name.

This can mean if you run the "delete local branches and remotes" command it will wrongly delete your branch.

  • Extension version: 0.106.0
  • VSCode Version: 1.98.0 (system setup)
  • OS: Windows_NT x64 10.0.22631
  • Repository Clone Configuration: fork of an upstream repository
  • Github Product: Github.com

Steps to Reproduce:

Unknown. Note in .git/config you might see something like:

[branch "dev"]   # this branch was created a few days ago
	remote = origin
	merge = refs/heads/dev
	vscode-merge-base = origin/dev
	github-pr-owner-number = "cylc#cylc-ui#810"
	github-pr-owner-number = "cylc#cylc-ui#810"
	github-pr-owner-number = "cylc#cylc-ui#810"
	github-pr-owner-number = "cylc#cylc-ui#810"
	github-pr-owner-number = "cylc#cylc-ui#810"    # this is a PR that was closed 4 years ago!

or

[branch "log-wrap"]
	vscode-merge-base = origin/master
	remote = origin
	github-pr-owner-number = "cylc#cylc-ui#1708"
	github-pr-owner-number = "cylc#cylc-ui#1708"
	github-pr-owner-number = "cylc#cylc-ui#1708"
	github-pr-owner-number = "cylc#cylc-ui#1708"
	github-pr-owner-number = "cylc#cylc-ui#2078"   # finally the correct one!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.