AZ-400 Practice Question: Design and implement a source control strategy
Your Azure DevOps project contains a Git repository with multiple branches. You need to ensure that code reviews are mandatory for all pull requests targeting the 'release' branch. Additionally, the build pipeline must pass before merging. How should you configure branch policies?
⚠ Common exam trap
Watch out — candidates often assume 'Comment resolution' implies code review completion, but it only requires that all discussion comments are resolved, not that a specific number of reviewers have approved the changes.
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
✓
Enable 'Require a minimum number of reviewers' and 'Build validation'.
The requirement specifies two distinct conditions: mandatory code reviews (enforced by 'Require a minimum number of reviewers') and a passing build pipeline before merge (enforced by 'Build validation'). In Azure Repos, branch policies allow you to combine multiple checks; enabling only one of these would leave the other requirement unmet. Therefore, both policies must be enabled to satisfy the full criteria.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Enable 'Build validation' only.
Why it's wrong here
Enabling only 'Build validation' ensures the branch has a successful build before merging, but it does not require any human code review. Without a reviewer requirement, changes can be merged without peer approval, leaving code quality unvetted.
- ✗
Enable 'Require a minimum number of reviewers' only.
Why it's wrong here
Enabling only 'Require a minimum number of reviewers' mandates a set number of approvals but does not enforce a successful build. This allows changes with compilation errors or test failures to be merged, so the branch is not protected against broken builds.
- ✓
Enable 'Require a minimum number of reviewers' and 'Build validation'.
Why this is correct
Combining 'Require a minimum number of reviewers' and 'Build validation' enforces both peer review and a successful build pipeline. This ensures that changes are approved by the required reviewers and meet the build quality gate before merging, delivering comprehensive branch protection.
- ✗
Enable 'Require a minimum number of reviewers' and 'Comment resolution'.
Why it's wrong here
Enabling 'Require a minimum number of reviewers' and 'Comment resolution' ensures approvals and that review comments are addressed, but it omits 'Build validation'. Without a successful build check, code that fails to compile or breaks tests can still be merged, leaving the main branch vulnerable.
Visual reference
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Azure Repos
Azure Repos is a set of version control tools that allow teams to manage their source code, track changes, and collaborate on software projects using Git or Team Foundation Version Control (TFVC) within the Microsoft Azure ecosystem.
Key term
Azure DevOps
Azure DevOps is a Microsoft service that provides development tools for planning, building, testing, and deploying software applications using automated pipelines and collaboration features.
About these practice questions
This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.