All pages

The Final Piece: How to Trigger PR Builds

How to correctly configure PR validation builds using Azure DevOps Branch Policies instead of YAML pr: blocks.

Remove the pr: block from your YAML — use Branch Policies instead.

  1. Go to Repos → Branches
  2. Your branch → ...Branch policies
  3. Under "Build Validation" → +
  4. Select your pipeline, set trigger to Automatic, requirement to Required
  5. Save; repeat for main