AZ-400 ยท Branching and pull requests
Pull request workflow and branch policies
Azure Repos branch policies (reviewers, build validation, comment resolution, linked work items, status checks) and GitHub branch protection/rulesets (required reviews, status checks, CODEOWNERS).
Key points
- A pull request gates a feature branch into a protected branch.
- Azure Repos policies: minimum reviewers, automatically included reviewers by path, build validation, comment resolution, linked work items, external status checks.
- GitHub: branch protection rules or rulesets require approving reviews, status checks, CODEOWNERS review.
- Policies block direct pushes and incomplete PRs; only bypass permissions skip them.
Source: https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies?view=azure-devops
Practice questions
Which Azure Repos branch policy prevents a pull request from completing while discussion threads are still open?
- Build validation
- Check for linked work items
- Check for comment resolution
- Limit merge types
Show answer
Answer: C. Check for comment resolution
The comment resolution policy checks that all PR comments are resolved. Build validation checks a pipeline result and linked work items checks traceability; neither looks at comment threads.
Which of these are branch policies you can configure in Azure Repos?
- Require a minimum number of reviewers
- Build validation
- Check for linked work items
- A CODEOWNERS file enforced by the repo
- Dependabot version updates
Show answer
Answer: A. Require a minimum number of reviewers, B. Build validation, C. Check for linked work items
Minimum reviewers, build validation and linked work items are all Azure Repos branch policies. A CODEOWNERS file is the GitHub mechanism, and Dependabot updates are a dependency feature, not a branch policy.
In GitHub branch protection, a required status check that finished as skipped always blocks the merge.
Show answer
Answer: False
False. Required checks must report success, skipped or neutral to allow the merge; only failing or missing checks block it.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
