Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Implement branch merging restrictions by using branch policies and branch protection rules

A worked example

Multiple answers

An Azure Repos Git repository uses an existing validation pipeline and one build-validation policy for main, without a path filter. You are comparing alternative configurations of that policy.

For each configuration, assume an open pull request has a passing validation result from four hours ago. Another pull request is about to update main. The open pull request's source branch will remain unchanged until after that update.

The configuration must meet these requirements:

  • The imminent update to main must invalidate the existing passing result.
  • Subsequent pushes to the pull request's source branch must automatically queue validation builds.
  • A failed validation build must block pull request completion.

No participant has policy-bypass permissions.

Which two policy configurations meet all the requirements? Select two. Each correct answer presents a complete solution.

Choose 2 answers.
Why

Immediate expiration invalidates the passing result when main changes. The two-hour expiration also works here because the existing result is already four hours old. Both successful configurations use Automatic to queue builds after source updates and Required to prevent completion following a failed build.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free