vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

There are updates available for this pull request while master branch is checked out

Open AlCalzone opened this issue 5 years ago • 6 comments

Extension version: 0.22.0 VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:34:46.910Z) OS version: Windows_NT x64 10.0.19041

Steps to Reproduce:

  1. Check out master branch
  2. Have remote changes that are not pulled
  3. grafik

Edit: This might be related to the following info I found in the log:

[Info] Review> current branch master is associated with pull request #1335
[Info] Review> Resolving pull request
[Info] Review> Fetching pull request data
[Info] Review> register comments provider
[Info] Review> display pull request status bar indicator and refresh pull request tree view.

If I try to open it from the status bar grafik, I'm getting the error Cannot read property 'commit' of undefined

AlCalzone avatar Jan 14 '21 11:01 AlCalzone

Upon further investigation: This is the mentioned PR: https://github.com/zwave-js/node-zwave-js/pull/1335

I'm not sure what went wrong, but Github says that it was merged into master without any commits: grafik

AlCalzone avatar Feb 03 '21 13:02 AlCalzone

I would help fix this (since this is really annoying), but I have no clue how to even start debugging.

AlCalzone avatar Feb 03 '21 13:02 AlCalzone

Ping - How can I help get this fixed?

AlCalzone avatar Jul 28 '21 08:07 AlCalzone

So, I figured this out. At some point this extension has associated the master branch with the broken PR under the key github-pr-owner-number in the local .git/config. Since that entry never got cleaned up, it kept showing that the master branch was associated with the PR.

[branch "master"]
	remote = origin
	merge = refs/heads/master
	github-pr-owner-number = "zwave-js#node-zwave-js#1335"

I removed the entry manually and the problem is resolved.

AlCalzone avatar Aug 17 '21 10:08 AlCalzone

Good find! That sort of worked for me. I had to manually change the record in .config then switch branches then back to the branch my PR was open on. I wonder if it has anything to do with protected branches? Perhaps the plug-in is expecting the branch to be deleted?

ryankleindev avatar Aug 21 '21 17:08 ryankleindev

So, I figured this out. At some point this extension has associated the master branch with the broken PR under the key github-pr-owner-number in the local .git/config. Since that entry never got cleaned up, it kept showing that the master branch was associated with the PR.

[branch "master"]
	remote = origin
	merge = refs/heads/master
	github-pr-owner-number = "zwave-js#node-zwave-js#1335"

I removed the entry manually and the problem is resolved.

I'm having the same issue, but deleting the entry manually didn't seem to help. I even tried to delete the entire repo and re-clone it, but the pull request still came back. Any hints?

The PR has already been merged and the branch has been deleted, but it still shows up in the pull request as though waiting for me to do something with it.

bessx avatar Aug 09 '22 00:08 bessx