如果有新的提交被推送到分支,是否有一种方法可以使Github取消批准请求请求? [英] Is there a way to make Github un-approve a pull request if a new commit is pushed to the branch?

查看:99
本文介绍了如果有新的提交被推送到分支,是否有一种方法可以使Github取消批准请求请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Github中使用新的请求请求批准过程,如果我批准PR,但是开发人员将新的提交推送到该分支,我希望PR返回到其开始时的状态(即不批准).

Using the new pull request approval process in Github, if I approve a PR but then a dev pushes a new commit to that branch I'd want the PR to go back to the state it is in to start with (i.e. not approved).

目前它保持绿色,但实际上分支中尚未审查代码.

At the moment it stays green but in reality there is code that hasn't been reviewed in the branch.

推荐答案

在GitHub上,导航到存储库的主页. 在您的存储库名称下,单击设置. 在左侧菜单中,点击分支. 使用下拉菜单选择要限制的分支.

On GitHub, navigate to the main page of the repository. Under your repository name, click Settings. In the left menu, click Branches. Select the branch you want to restrict using the drop-down menu.

选择在推送新提交时关闭过时的请求批准.

当将修改代码的提交推送到分支时,这将取消对拉取请求的批准审核.

This dismisses a pull request approval review when a code-modifying commit is pushed to the branch.

点击保存更改.

参考: https://help.github.com /articles/enable-required-reviews-for-pull-requests/

这篇关于如果有新的提交被推送到分支,是否有一种方法可以使Github取消批准请求请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆