AZ-400 Design and implement source control Practice Question
A development team uses Git for source control. They want to ensure that all code changes are reviewed before merging into the main branch. Which branch policy should they configure in Azure Repos?
⚠ Common exam trap
Many exam-takers confuse 'code review' with other quality gates like build validation or work item linking, but the question explicitly asks for a policy that ensures all changes are reviewed before merging, which is directly addressed only by reviewer and comment resolution policies.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Configure a branch policy that requires a minimum number of reviewers and resolves all comments.
Azure Repos branch policies allow you to enforce that pull requests require a minimum number of reviewers and that all comments are resolved before merging. This directly ensures that all code changes are reviewed and any feedback is addressed, meeting the team's requirement for mandatory code review before merging into the main branch.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Configure a branch policy that requires a minimum number of reviewers and resolves all comments.
Why this is correct
This branch policy enforces mandatory peer review by requiring at least a specified number of reviewers to approve the pull request, and also requires that all comment threads be resolved before merging. This ensures that code is reviewed by multiple team members before integration, directly serving the goal of ensuring peer review.
- ✗
Configure a branch policy that requires commit messages to follow a specific pattern.
Why it's wrong here
While enforcing a commit message pattern can improve commit history readability and traceability, it does not require any human peer review of the code changes. Automated checks on commit messages validate formatting but do not involve another developer evaluating the code content, so it does not satisfy the requirement for peer review.
- ✗
Configure a branch policy that requires a successful build.
Why it's wrong here
A successful build validates that the code compiles and passes automated tests, providing a quality gate but not human review. CI build results do not constitute peer review because no other developer manually inspects the changes for logic, design, or maintainability.
- ✗
Configure a branch policy that requires linked work items.
Why it's wrong here
Linking work items ensures traceability between code changes and backlog items, but it does not involve any code review process. A developer can link a work item and still push unreviewed code, so this policy does not enforce peer review.
Visual reference
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Branch
A branch is a pointer to a specific commit in a version control system that allows you to work on features or fixes in isolation from the main codebase.
Key term
Code review
A code review is a systematic examination of source code by one or more developers to find defects, improve quality, and enforce coding standards before it is merged into the main codebase.
About these practice questions
Courseiva writes every AZ-400 question from scratch — 823 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.