-
Notifications
You must be signed in to change notification settings - Fork 289
Consider guarding against GitHub Pull Requests extension #2113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I just experienced this while trying to use I also confirmed that closing the VS Code window open to the affected workspace (it was ark) makes |
I was in position to experience this again, so I did And then I had another chance to use This suggests there something about the timing / order of something the extension is doing in reaction to the git/github operations happening in |
Had another chance to experience. This time I put some debugging print statements in. I also paused a few seconds when contemplating the "Proceed anyway?" question:
Did not experience the problem. Was it my pause that "fixed" it? |
No matter what, perhaps it is a good idea to Line 612 in a653d6e
If that fails, we could report that more gracefully and do any remaining work. |
Another usage of |
@hadley has now bumped into this and we discussed in Slack. His theory is that it's a race condition where multiple tools are working with the repo git config and I think that looks pretty likely. Here's a bit of
In particular, note the key In contrast, here's branch metadata in a repo where I've got an open PR but have never touched this repo with VS Code or Positron:
The error is happening in this call to Lines 608 to 613 in a653d6e
It must to something like this:
I note that, even when I see this error message, the branch has actually been deleted. |
Probably happening right around here: |
This happens to me a lot and I find that calling So one super simple thing you could do to make the problem less ouchy is to print the PR number earlier in the process, for example: pr_finish()
#> i Finishing PR posit-dev/shinychat/#56
#> ✔ Switching back to default branch ("main").
#> ✔ Pulling changes from "origin/main".
#> ✔ Deleting local "monorepo" branch.
#> Run `rlang::last_trace()` to see where the error occurred.
#> Error:
#> ! could not find key 'branch.monorepo.vscode-merge-base' to delete
#> i Try running `pr_finish(56)` again to complete the operation.
pr_finish(56)
#> ✔ Deleting local "monorepo" branch.
#> ✔ PR posit-dev/shinychat/#56 has been merged, deleting remote branch "origin/monorepo". |
Uh oh!
There was an error while loading. Please reload this page.
The GitHub Pull Requests extension does some funny business with branches that it perceives to be PR-related. I haven't delved into the details re: whether it's temporarily changing branch names or shimming some git command or some other third thing.
But whatever malarkey it is, it causes
pr_finish()
to fail like so:What the heck is this?
The extension seems to assume that it will be mediating all of your git(hub) work and it can do something like this, which then breaks other tools.
Not sure if it's my / usethis's problem to solve but it's conceivable it would be worth detecting that suffix and trimming it off if this problem persists.
The text was updated successfully, but these errors were encountered: