AZ-400 exam dumps

AZ-400 practice question 2 of 306

Designing and Implementing Microsoft DevOps Solutions. Professional level, Microsoft. Free question with the correct answer and a full explanation.

AZ-400 Question 2

Single answer

Your organization is implementing a new feature in Azure DevOps and wants to ensure each code change is linked to the appropriate work items for complete traceability. The team decides to enforce references to work items in commit messages or pull request descriptions before merging changes. Which action should you implement to achieve this requirement?

  1. A

    Configure a branch policy in Azure Repos that requires linked work items in pull requests before allowing merges.

  2. B

    Enable the 'Enforce Commit Message Policy' in the Azure DevOps Project Settings under Boards > Process.

  3. C

    Create an Azure DevOps Pipeline task that automatically appends work item IDs to commit messages.

  4. D

    Use a Git hook on each developer's machine to insert work item references before the local commit is completed.

Show answer and explanation

Correct answer: A

Explanation

Designing and implementing traceability in Azure DevOps often involves enforcing references to work items in commits or pull requests. By configuring a branch policy within Azure Repos, you can ensure that changes referencing relevant tasks or user stories are merged only when they meet the traceability requirement. This approach aligns with best practices outlined in Microsoft Docs for maintaining end-to-end traceability (see https://docs.microsoft.com/azure/devops/repos/git/branch-policies for details).

  • A. Correct.

    Correct. Configuring a branch policy in Azure Repos to enforce linked work items in PRs ensures that changes cannot be merged unless they reference the correct work items. This is the recommended approach since it centralizes the enforcement and provides an end-to-end traceability mechanism.

  • B. Incorrect.

    Incorrect. There is no native 'Enforce Commit Message Policy' under Boards > Process in Azure DevOps. Process configurations do not provide commit message validation. This distractor could be believed if someone wrongly assumed boards process settings apply to commit messages.

  • C. Incorrect.

    Incorrect. An Azure DevOps Pipeline task can be used to detect commit messages or annotate work items, but it does not strictly enforce that developers include the references in their local commits or PRs prior to entering the pipeline. It� not a reliable method of preventing merges without work item references.

  • D. Incorrect.

    Incorrect. While Git hooks can enforce policies locally, they can be bypassed or incorrectly configured on each developer� machine. They are not a centralized or recommended approach for enterprise-level enforcement. Branch policies are more effective and consistent in Azure DevOps.

Timed practice exam

Take a AZ-400 practice test under exam conditions

70 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam