-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
Describe the bug
In previous versions, one could work with gh pr checkout <num> && <do changes> && git push on pull requests where the maintainer checkbox was set. With the latest release, this is no longer possible as the remote always gets set to upstream and the merge target(?) to refs/pull/?/head. Thus leading to the errors of the following style:
…
To github.com:conda-forge/lief-feedstock.git
! [remote rejected] HEAD -> refs/pull/22/head (deny updating a hidden ref)
error: failed to push some refs to 'github.com:conda-forge/lief-feedstock.git'
The only change I see in the commit history that could be related to this is #3663.
Steps to reproduce the behavior
See the description above.
Expected vs actual behavior
Expected output would be a successful push but we get the above snippet as an error.
In my case, one can see the change in difference between the following two PRs:
# cat .git/config
…
[branch "0.11.3_had13d6"]
remote = git@github.com:regro-cf-autotick-bot/lief-feedstock.git
merge = refs/heads/0.11.3_had13d6
[branch "0.11.5_h9b1896"]
remote = upstream
merge = refs/pull/22/head
The first was created with a previous gh version whereas the latter using 1.10.3. They are both PRs from the same fork to which I should be able to push. Changing the remote here leads to a successful push.
Logs
# gh version
gh version 1.10.3 (2021-05-21)
https://github.com/cli/cli/releases/tag/v1.10.3