We are trying to set up our repository's branch policies so that for a particular folder:
- Any PR pushing a new file to the repo must have a required reviewer
- 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 theAutomatically 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 policyRequire 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.