简体   繁体   中英

Automatically set branch policies for different types of PRs in Azure Devops

We are trying to set up our repository's branch policies so that for a particular folder:

  1. Any PR pushing a new file to the repo must have a required reviewer
  2. Any PR making changes to existing files need not be approved by a reviewer

We've had a look at path filters, but I'm not sure if it is possible to achieve this without having to manually exclude each existing file from the required reviewer policy.

Is there any way we could set this up to be automatic and without intervention?

Several branch policies offer path filters. If a path filter is set, the policy will only apply when files which match the filter are changed.

For example, in the branch policy, we set up Require a minimum number of reviewers and Automatically included reviewers, in the Automatically included reviewers , we could configure the folder path.

Then we create a new file, it will bypass the branch policy Automatically included reviewers and another policy Require a minimum number of reviewers is still in effect.

You could check this doc for more details.

In addition, you could add your request for this feature on our UserVoice site , which is our main forum for product suggestions. Thank you for helping us build a better Azure DevOps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM