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
mainmust 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.
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.
- Set and manage branch policies - Azure ReposMicrosoft Learn