Filter when rules are applied
Conditions (the if
property) determine whether a rule should be applied based on various criteria. They allow you to target specific pull requests based on authors, branches, files, labels, and more.
Conditions are defined in the if
array of a rule:
All conditions must pass for the rule to be applied. Each condition has a type
and type-specific parameters.
Filter based on the PR author
Filter based on branch names
Filter based on PR description content
Filter based on changed files
Filter based on PR labels
Filter based on PR milestone
Filter based on repository properties
Filter based on team membership
Only apply a rule to PRs from specific users:
Only apply a rule to PRs targeting a specific branch:
Only apply a rule when specific files are modified:
Only apply a rule to PRs with specific labels:
All conditions must pass for the rule to be applied:
This rule will only apply to PRs:
main
branch, ANDsecurity
, ANDdependabot
Most conditions support pattern matching, which can be:
"main"
"feat/*"
"/^feat\/.+$/"
When using regular expressions, enclose the pattern in forward slashes (/pattern/
).
This rule only applies to PRs that:
main
branchFilter when rules are applied
Conditions (the if
property) determine whether a rule should be applied based on various criteria. They allow you to target specific pull requests based on authors, branches, files, labels, and more.
Conditions are defined in the if
array of a rule:
All conditions must pass for the rule to be applied. Each condition has a type
and type-specific parameters.
Filter based on the PR author
Filter based on branch names
Filter based on PR description content
Filter based on changed files
Filter based on PR labels
Filter based on PR milestone
Filter based on repository properties
Filter based on team membership
Only apply a rule to PRs from specific users:
Only apply a rule to PRs targeting a specific branch:
Only apply a rule when specific files are modified:
Only apply a rule to PRs with specific labels:
All conditions must pass for the rule to be applied:
This rule will only apply to PRs:
main
branch, ANDsecurity
, ANDdependabot
Most conditions support pattern matching, which can be:
"main"
"feat/*"
"/^feat\/.+$/"
When using regular expressions, enclose the pattern in forward slashes (/pattern/
).
This rule only applies to PRs that:
main
branch