I am trying to use lerna publish to manage package publishing in my team. So what lerna does at the end of every publish is, it bumps the version in the package.json
file and commits those changes in the branch that did the publish.
However in master I need "Require pull request reviews before merging"
to be active as it is protected branch.
My problem is not in publishing as lerna publishes the package. However the circle-ci fails with this error:
remote: error: GH006: Protected branch update failed for refs/heads/publish-test.
remote: error: At least 1 approving review is required by reviewers with write access.
To github.com:username/repo.git
! [remote rejected] publish-test -> publish-test (protected branch hook declined)
I tried enabling "Restrict who can push to matching branches"
option to allow a user to commit in master, (we are using a bot user for devops commits).
Is there a way to add a user exception to the option "Require pull request reviews before merging"
or do a pre-merge hook(so I can publish before the merge in ci)?