Requirements a pull request must meet on an Azure Repos branch, such as minimum reviewers, resolved comments, linked work items, status checks and build validation. GitHub offers rulesets and branch protection rules for this.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains Branch policies in context, with comparison tables and the common traps.
Terms in this definition
- Pull request
In Azure Repos or GitHub, a proposal to merge one branch into another, at which point reviewers and branch policies or protection rules come into play.
- Azure Repos
Azure DevOps' version control: Git (and legacy centralised TFVC), guarded by branch permissions and policies. GitHub's counterpart is its repositories.
- Build validation
Requires a passing pipeline run on a pull request's pre-merge result before completion, valid until its build expiration lapses; an Azure Repos branch policy.
- Branch protection
Rules on a branch such as main (branch protection in GitHub, branch policies in Azure Repos) that stop people pushing to it directly and require reviewed pull requests for merges.
Related terms
- 4-eyes principle
A working rule whereby a second engineer must check both the code and the plan output before anything is released to production. Pull requests and branch policies are what enforce it.
- Bypass policies when completing pull requests
A branch permission in Azure Repos that allows someone to override failing branch policies and complete the pull request anyway.
- Path filter
Limits branch policies or triggers to changes in certain folders. Azure Repos wants a leading / or wildcard and allows * to span folder separators, unlike GitHub, where fnmatch's * halts at each /.