Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Github 如何将用户异常添加到";在合并前要求请求审核”;git保护分支中的选项?_Github_Circleci - Fatal编程技术网

Github 如何将用户异常添加到";在合并前要求请求审核”;git保护分支中的选项?

Github 如何将用户异常添加到";在合并前要求请求审核”;git保护分支中的选项?,github,circleci,Github,Circleci,我正在尝试使用来管理团队中的包发布。因此,lerna在每次发布结束时所做的是,在package.json文件中修改版本,并在发布分支中提交这些更改 但是,在master中,我需要在合并“之前进行请求审查,以使其处于活动状态,因为它是受保护的分支 我的问题不在于发布,因为lerna发布了包。但是,circle ci因以下错误而失败: remote: error: GH006: Protected branch update failed for refs/heads/publish-test. r

我正在尝试使用来管理团队中的包发布。因此,lerna在每次发布结束时所做的是,在
package.json
文件中修改版本,并在发布分支中提交这些更改

但是,在master中,我需要在合并“之前进行请求审查,以使其处于活动状态,因为它是受保护的分支

我的问题不在于发布,因为lerna发布了包。但是,circle ci因以下错误而失败:

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)
我尝试启用
“限制谁可以推送到匹配的分支”
选项,以允许用户在master中提交(我们正在使用bot用户进行devops提交)


是否有方法将用户异常添加到选项
“合并前需要请求审核”
,或执行预合并挂钩(以便我可以在ci中合并前发布)

否当前没有选项,但您可以提出功能请求。可能没有办法绕过分支保护,这正是它的重点所在


关于你的第二个问题:据我所知,没有特定的“预合并”钩子,这里是。您可以在正在合并到的分支的推送时解决此触发问题,也可以在创建发布时触发,或者其中一个可以启用您的场景。

我的回答对您有帮助吗?还是你找到了不同的解决方案?加入这里,有什么解决办法吗?