nerdexam
Microsoft

AZ-400 · Question #207

Drag and Drop Question You are configuring the settings of a new Git repository in Azure Repos. You need to ensure that pull requests in a branch meet the following criteria before they are merged: -

The correct answer is A build policy; A status policy. A build policy is correct for ensuring committed code compiles successfully because it triggers a build pipeline on pull request creation and blocks merging if the build fails. A status policy is correct for the SonarCloud Quality Gate requirement because it allows third-party se

Submitted by yuki_2020· Mar 6, 2026Design and Implement Source Control - Configure repository settings and branch policies to enforce code quality gates and build validation in Azure DevOps (AZ-400 Exam Domain: Implement CI with Azure Pipelines and GitHub Actions / Source Control Management)

Question

Drag and Drop Question You are configuring the settings of a new Git repository in Azure Repos. You need to ensure that pull requests in a branch meet the following criteria before they are merged: - Committed code must compile successfully. - Pull requests must have a Quality Gate status of Passed in SonarCloud. Which policy type should you configure for each requirement? To answer, drag the appropriate policy types to the correct requirements. Each policy type may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point. Answer:

Exhibits

AZ-400 question #207 exhibit 1
AZ-400 question #207 exhibit 2

Answer Area

Drag items

A build policyA check-in policyA status policy

Correct arrangement

  • A build policy
  • A status policy

Explanation

A build policy is correct for ensuring committed code compiles successfully because it triggers a build pipeline on pull request creation and blocks merging if the build fails. A status policy is correct for the SonarCloud Quality Gate requirement because it allows third-party services (like SonarCloud) to post a pass/fail status to Azure Repos via the Status API, which the policy then enforces before merging is permitted. These two policy types together cover both internal CI validation and external service quality gates in Azure Repos branch policies.

Topics

#Azure Repos#Branch Policies#SonarCloud Integration#Pull Request Validation

Community Discussion

No community discussion yet for this question.

Full AZ-400 Practice