require-azure-pipelines-trigger-branches
Require explicit branch filters for Azure Pipelines push triggers.
Targeted pattern scopeâ
trigger:inazure-pipelines.yml.- Missing
trigger.branchesnested filter.
What this rule reportsâ
This rule reports trigger configurations that do not explicitly scope push branches.
Why this rule existsâ
Branch-scoped push triggers prevent accidental CI overreach or undercoverage when trigger config drifts.
â Incorrectâ
trigger:
batch: true
â Correctâ
trigger:
branches:
include:
- main
When not to use itâ
Disable this rule if branch-scoping is intentionally handled outside repository YAML.
Rule catalog ID: R103