Closed saitho closed 2 years ago
This doesn't work. I created a personal access token on my account (with all permissions possible) but it still failed:
remote: error: GH006: Protected branch update failed for refs/heads/develop.
remote: error: At least 1 approving review is required by reviewers with write access.
https://github.com/saitho/backmerge-test/runs/3913868589
Repo settings:
Some people also report it's not working anymore here: https://github.community/t/how-to-push-to-protected-branches-in-a-github-action/16101/45
I tried:
Mhh that's interesting. Any ideas why?
Maybe add a console log in the first step to have a look if authedRepositoryUrl
is correct?
And/or run in debug mode?
I also found this: https://stackoverflow.com/a/63733988/10908838
I also found this: https://stackoverflow.com/a/63733988/10908838
Setting persist-credentials: false
for the checkout action did it.
The token used for backmerge only needs to be the token of a repo owner/admin and requires repo
scope.
I'll add a note in the documentation for that as well.
Error reproduced: https://github.com/saitho/backmerge-test/runs/3905294275?check_suite_focus=true Error fixed: https://github.com/saitho/backmerge-test/runs/3973108955
Note for GitHub Actions: This requires disabling
persist-credentials
in checkout action.Please provide a repository admin/owner's authentication token at
GITHUB_TOKEN
withrepo
scope.