Branch Policy: Require atleast 1 Approval from specified approvers

ぐ巨炮叔叔 提交于 2019-12-13 02:11:40

问题


So we have 6 people in the project team. 1 Techlead and 1 Assistant Techlead.

In our branch policy we want to setup that only the Techlead and Assistant Techlead can approve the pull request. We only need 1 approval from them to avoid bottle neck if the other one is on leave.

The problem is there are only 2 choices in the branch policy setting.

A. Specifying the number of required approver (Will not work since normal developers would be able to approve as well)

B. Specifying the actual person to approve (Will not work since both of them will be required and cause a bottle neck when one is on leave)

Can someone please point us in the right direction?


回答1:


You can provide required reviewers that are automatically added to each PR. These reviewers can also be groups.

Do this:

  1. Create a group that contains your tech lead and assistant tech lead and.
  2. Make that group a required approver under Automatically include code reviewers

You should get something like this:

Your statement normal developers would be able to approve as well is only true if the group that is required contains your normal developers.

This way at least 1 person from provided group (in this case Developers) must approve a PR. If you want you can also provide a path filter to require only reviews on certain changes or assign a different group for files or folders.



来源:https://stackoverflow.com/questions/51644674/branch-policy-require-atleast-1-approval-from-specified-approvers

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!