Are you still adding your teammates one by one to your Azure DevOps PRs?
You know the drill. You create your pull request, then click and search for Jane. Click, search for Bob. Click, search for Maria. Did you forget someone? Probably.
It's a repetitive task that's slow, tedious, and just gets in the way of merging your code.
There is a much cleaner, more efficient way to handle this. You don't want to manage a list of individuals; you want a single rule that says, "I need one approval from the Dev Team."
Let's build that rule. It's a "set it and forget it" fix using a Branch Policy.
Prerequisite: A Team
This trick relies on having your reviewers grouped into a 'Team' in Azure DevOps. If you haven't done this, it's a one-time setup and makes managing permissions much easier. Check the docs on how to create a team in Azure DevOps.
Your Branch Policy
You set this up once on your target branch (like main or develop), and it works forever.
Go to Project Settings (represented by the gear icon, located in the bottom-left corner).
Navigate to Repositories (under the
Reposheading).Click the repo you want, then the Policies tab.
Scroll to the 'Branch Policies' section and click on the branch you want to protect (e.g.,
main).
Find the "Automatically include reviewers" section and click the
+button.
(If you want to read about all the policy options, you can find the official docs on branch policies here.)
Reviewer policy
Reviewers: Search for and select your team's name (e.g.,
[MyProject]\Dev Team). Do not add the individuals.Policy requirement: Set this to Required.
Minimum number of reviewers: This option will now appear. Set it to 1.
Click Save.
What Did You Just Build?
From now on, every new PR to that branch will automatically add the Dev Team as a single, required block.
As soon as one person from that team approves it, the entire team block gets a green checkmark.
No more clicking on individual names. No more forgetting teammates. Your PR is unblocked, and you can get back to your flow. 😌
What's your favorite 'set it and forget it' setting in Azure DevOps? What's one small policy tweak that has removed the most friction for your team? Share it in the comments!

Top comments (0)