AZ-400 exam dumps

AZ-400 practice question 68 of 306

Designing and Implementing Microsoft DevOps Solutions. Professional level, Microsoft. Free question with the correct answer and a full explanation.

AZ-400 Question 68

Single answer

You manage a project in Azure Repos and want to enforce a workflow so that all changes to the 'main' branch require at least one successful build, two approving reviews, and a link to the relevant work item before merging. Which configuration should you implement to meet these requirements?

  1. A

    Configure the �main� branch with policies requiring a passing build, two approvals, and linked work items before allowing merges

  2. B

    Require each developer to manually confirm their build status and code review in pull request comments prior to completing the merge

  3. C

    Enable a policy under �Repository Settings� to restrict direct pushes, but allow merges without any build validation

  4. D

    Use a merge template specifying that developers must state which work items they are closing before merging

Show answer and explanation

Correct answer: A

Explanation

Branch policies in Azure DevOps (or branch protections in GitHub) provide an automated way to ensure pull requests meet specific criteria before merging, such as a passing build, required reviewer approvals, and linking work items. According to Microsoft Docs, configuring these policies on the protected branch ensures a consistent process without relying on manual checks or voluntary compliance.

  • A. Correct.

    Correct: Defining branch policies in Azure Repos requiring a successful build, a minimum number of reviewers, and enforced work-item linking is the recommended way to protect the main branch and enforce compliance across your team.

  • B. Incorrect.

    Incorrect: Manually confirming builds and code reviews through comments is error-prone and not enforced by the system. This does not ensure a reliable workflow that all team members follow consistently.

  • C. Incorrect.

    Incorrect: Restricting direct pushes helps, but lacks mandatory build validation or multiple reviews. This option also does not enforce linking work items to commits.

  • D. Incorrect.

    Incorrect: A merge template can guide best practices, but it� not enforced by the system. Developers could ignore these guidelines, making this insufficient for strict compliance.

Timed practice exam

Take a AZ-400 practice test under exam conditions

70 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam