Branch protection rule blocking release process?
richardlau opened this issue · comments
Richard Lau commented
I've just published a new version of citgm (8.1.1) to npm. When I tried to push the updated main
, I got this error:
$ git push upstream main
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: At least 1 approving review is required by reviewers with write access.
To github.com:nodejs/citgm
! [remote rejected] main -> main (protected branch hook declined)
error: failed to push some refs to 'github.com:nodejs/citgm'
$
I temporarily renamed the branch protection rule so I could push main
to match the published npm version and then renamed the rule back again but am opening this for discussion to avoid this happening again.
Michaël Zasso commented
Sorry, I was the one who added the branch protection rule (following GitHub's banner as the main branch wasn't protected at all).
I forgot about the release process. I removed the requirement for a pull request and just kept the linear history.