Courseiva
Design and implement build and release pipelineshardMultiple ChoiceObjective-mapped

Do New Commits Reset Pull Request Approvals? It Depends on resetOnPush

Exhibit

Refer to the exhibit.
```json
{
  "policies": [
    {
      "policy": {
        "name": "Require Pull Request Review",
        "isEnabled": true,
        "blocking": true,
        "settings": {
          "minimumApproverCount": 2,
          "creatorVoteCounts": false,
          "allowDownvotes": true,
          "resetOnPush": false
        }
      }
    }
  ]
}
```

You are configuring a branch policy for the main branch using the Azure DevOps REST API. The JSON above is the policy configuration. A developer pushes a new commit to an existing pull request. What happens to the existing approvals?

Quick Answer

By default, Azure DevOps branch policies don't invalidate existing approvals when a new commit lands on a pull request — that only happens if resetOnPush is explicitly set to true in the policy configuration. With resetOnPush left false, or unset, prior approvals stay valid even after the developer pushes additional commits.

⚠ Common exam trap

A common mix-up: candidates assume any new commit to a pull request automatically resets approvals, but Azure DevOps requires explicit configuration (the 'resetOnPush' property) to enable that behavior.

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

The existing approvals remain valid.

By default, Azure DevOps branch policies do not automatically reset approvals when a new commit is pushed to a pull request. The policy configuration shown includes the 'resetOnPush' property set to false (or it is not enabled), which means existing approvals remain valid even after new commits are pushed. Only if 'resetOnPush' is explicitly set to true would approvals be invalidated.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The existing approvals remain valid.

    Why this is correct

    Correct: resetOnPush: false means approvals are not reset.

  • The policy blocks the push until re-reviewed.

    Why it's wrong here

    The policy is blocking but this does not affect approval reset.

  • The pull request is automatically rejected.

    Why it's wrong here

    No automatic rejection based on policy.

  • All existing approvals are reset.

    Why it's wrong here

    resetOnPush is false, so approvals are not reset.

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

Same concept, more angles

4 more ways this is tested on AZ-400

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Refer to the exhibit. A developer pushes a new commit to an existing pull request targeting the main branch. What is the effect on the pull request?

medium
  • A.The pull request is automatically merged.
  • B.The existing approvals remain valid, and no re-review is needed.
  • C.All existing approvals are revoked, and the pull request must be re-approved.
  • D.The new commit is rejected because it was pushed without a code review.

Why C: The policy 'Reset code reviewer votes when new changes are pushed' is set to true. Therefore, when a new commit is pushed, all previous reviewer votes are reset. The required number of reviewers is 2, but minimum is 1, so at least one reviewer must approve again.

Variation 2. You are reviewing the branch protection policy for the main branch in an Azure DevOps repository. Based on the exhibit, what happens when a stale review exists on a pull request after new changes are pushed?

medium
  • A.Admins are exempt from the review requirement
  • B.The stale review is automatically dismissed, and the PR requires new approvals
  • C.The PR still requires only 2 approvals, but stale reviews are not dismissed
  • D.The PR can be merged even without the required reviews

Why B: The branch protection policy for the main branch has 'Reset code reviewer votes when there are new changes' enabled. When a stale review exists after new changes are pushed, Azure DevOps automatically dismisses the previous approval(s) and requires new approvals to meet the minimum number of reviewers (2). This ensures that reviewers re-evaluate the latest code changes before the pull request can be merged.

Variation 3. You have the above branch policy configuration for the main branch. A developer pushes a new commit to an existing pull request. What happens?

hard
  • A.The existing approvals are reset, but no new build is queued.
  • B.The pull request is automatically completed.
  • C.The existing approvals are reset, and a new build is automatically queued.
  • D.The existing approvals remain valid, and the build is not requeued.

Why C: The branch policy has 'Reset code review votes when new changes are pushed' enabled (resetOnSourcePush: true) and 'Build validation' with 'Automatically queue a new build when new changes are pushed' enabled (queueOnSourceUpdateOnly: true). When a new commit is pushed to an existing pull request, the existing approvals are reset, and a new build is automatically queued. Therefore, option C is correct.

Variation 4. Your team uses Azure DevOps with a Git repository. You want to enforce that all pull requests to main must have at least one reviewer from the 'security' group. Which two configurations are required? (Choose two.)

medium
  • A.Configure automatic reviewers for the security group.
  • B.Add the security group as a required reviewer for the main branch policy.
  • C.Create a repository policy for the main branch.
  • D.Set the minimum number of reviewers to 1 in the branch policy.
  • E.Configure a branch protection rule in GitHub.

Why B: You can add the security group as a required reviewer in the branch policy. Option D is correct because setting the minimum number of reviewers to 1 ensures at least one reviewer is required. Option A is incorrect because automatic reviewers are not the same as required reviewers; they only suggest reviewers but do not enforce mandatory review. Option C is incorrect because a repository policy applies to all branches, not just main, and does not enforce required reviewers for pull requests; a branch policy is needed. Option E is incorrect because a branch protection rule is a GitHub feature, not available in Azure Repos.

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.