Courseiva
Configure processes and communicationseasyMultiple SelectObjective-mapped

AZ-400 Configure processes and communications Practice Question

Your organization uses GitHub and wants to automatically assign pull request reviewers based on the files changed. Which three steps should you take?

⚠ Common exam trap

Candidates often confuse 'Require pull request reviews before merging' (which only requires any reviewer approval) with 'Code owner review requirement' (which specifically requires approval from the code owner defined in CODEOWNERS), leading them to think option C alone is sufficient without the CODEOWNERS file and the code owner enforcement.

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 'Code owner review requirement' in branch protection.

Configuring 'Code owner review requirement' in branch protection enforces that pull requests affecting files with defined code owners must be approved by those owners before merging. This ensures that changes to specific file patterns automatically require review from the designated teams or individuals, aligning with the goal of automatic assignment based on files changed.

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 'Code owner review requirement' in branch protection.

    Why this is correct

    Enabling 'Code owner review requirement' under branch protection mandates that any pull request modifying files with designated code owners must receive an approving review from at least one of those owners before merging. This setting enforces the approval from the exact responsible party, making it the correct automatic review-assignment mechanism.

  • Create a CODEOWNERS file in the repository defining teams for file patterns.

    Why this is correct

    A CODEOWNERS file (typically in .github/, root, or docs/) assigns users or teams as owners for specific file patterns; any pull request that touches these files automatically lists those owners as required or suggested reviewers. This file is a prerequisite for the 'Code owner review requirement' branch protection setting, as it defines who counts as an owner.

  • Enable 'Require pull request reviews before merging' branch protection rule.

    Why this is correct

    Enabling 'Require pull request reviews before merging' is a branch protection rule that ensures at least one approved review from a collaborator other than the PR author is present before merge. While it enforces the need for human review, it does not automatically assign specific reviewers; it only blocks merging until such a review occurs.

  • Enable 'Protected branches' for the main branch.

    Why it's wrong here

    'Protected branches' is an umbrella concept in GitHub referring to the set of branch protection rules (including review requirements and status checks) that can be applied to a branch. Simply 'enabling protected branches' is not a concrete setting, and it does not by itself auto-assign reviewers; you must configure specific rules like code owner review.

  • Configure team synchronization for the organization.

    Why it's wrong here

    Team synchronization in GitHub connects team membership to an identity provider (e.g., Azure AD) to automatically add/remove members based on IdP groups. This only manages who belongs to teams; it has no effect on automatically requesting reviewers for pull requests, and therefore does not satisfy the requirement for auto-assignment.

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 →

How Courseiva writes practice questions · Editorial policy

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.