Skip to Content

Microsoft AZ-400: What should include to ensure comments resolved before pull requests included in project build

Question

You use Azure Repos to manage source code and Azure Pipelines to implement continuous integration and continuous deployment (CI/CD). You need to ensure that all comments on pull requests are resolved before the pull requests are included in a build. The solution must minimize administrative effort. What should you include in the solution?

A. a custom action
B. a post-deployment gate
C. a branch policy
D. a pre-deployment gate

Answer

C. a branch policy

Explanation

To ensure that all comments on pull requests are resolved before including them in a build, you should include a branch policy in your solution.

Option C: A branch policy in Azure Repos allows you to enforce certain rules and requirements for branches in your repository. By configuring a branch policy, you can set up a requirement that all comments on pull requests must be resolved before the pull requests can be included in a build.

Here’s how you can set up a branch policy to achieve this:

  1. Go to your Azure Repos repository in the Azure DevOps portal.
  2. Select the branch for which you want to set up the policy.
  3. Click on the “Branch policies” tab.
  4. Click on the “Add” button to add a new policy.
  5. In the “Add policy” dialog, select the “Require a minimum number of reviewers” option.
  6. Set the minimum number of reviewers to 1 or more, depending on your requirements.
  7. Enable the “Check for comment resolution” option.
  8. Save the branch policy.

By enabling the “Check for comment resolution” option, the branch policy will ensure that all comments on pull requests are resolved before the pull requests can be included in a build. This helps maintain code quality and ensures that any feedback or issues raised during the code review process are addressed before the code is deployed.

Option A: A custom action is not the most appropriate solution for this scenario. Custom actions are typically used for more specific and custom requirements that are not covered by built-in features.

Option B: A post-deployment gate is used to perform additional checks or validations after a deployment has been completed. It is not directly related to resolving comments on pull requests.

Option D: A pre-deployment gate is used to perform checks or validations before a deployment starts. While it can be used to enforce certain conditions, it is not specifically designed for resolving comments on pull requests.

Therefore, the correct option in this scenario is C. a branch policy.

Reference

Designing and Implementing Microsoft DevOps Solutions AZ-400 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Designing and Implementing Microsoft DevOps Solutions AZ-400 exam and earn Designing and Implementing Microsoft DevOps Solutions AZ-400 certification.