Skip to content
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

Consider guarding against GitHub Pull Requests extension #2113

Open
jennybc opened this issue Mar 13, 2025 · 0 comments
Open

Consider guarding against GitHub Pull Requests extension #2113

jennybc opened this issue Mar 13, 2025 · 0 comments
Labels
git git, GitHub, and CI in general

Comments

@jennybc
Copy link
Member

jennybc commented Mar 13, 2025

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:

✔ Switching back to default branch ("main").
✔ Pulling changes from "origin/main".
✔ Deleting local "switch-r-pkg-testing-shortcut" branch.
Error in libgit2::git_branch_delete : 
  could not find key 'branch.switch-r-pkg-testing-shortcut.github-pr-owner-number' to delete

What the heck is this?

branch.switch-r-pkg-testing-shortcut.github-pr-owner-number
                                    ^^^^^^^^^^^^^^^^^^^^^^^

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
git git, GitHub, and CI in general
Projects
None yet
Development

No branches or pull requests

1 participant