The entire condition
section is optional - you can run all rules all the time and see if it helps 😄
if-labeled
- apply the rule if the issue has any of the provided labelsskip-if-labeled
- skip rule processing if issue has any of the provided labelsfiles
patterns
- pattern matching the pull request file list (any of the patterns)extensions
- which file extension to match on pull request file list (must start with a dot [.
])
ref
patterns
- pattern matching the pull request ref namematch
- matches the pull request ref name
title
starts-with
- issue title has a prefixends-with
- issue title has a suffixpatterns
- pattern matching issue title (any of the patterns)
description
starts-with
- issue description has a prefixends-with
- issue description has a suffixpatterns
- pattern matching issue description (any of the patterns)
comments
count
- number of comments for issue (supported operators:==
,>
,<
,>=
,<=
)
patch
match-kind
- provide relation match when multiple sub-conditions exist. (supported values:any
orall
. Default:any
)order
- apply order hint to a rule. All rules are given order index 0.
Important: This will not place a rule in the exact position, but can assist in re-order rules.
rules:
rule-name:
condition:
if-labeled:
- label1
- label2
skip-if-labeled:
- label3
files:
patterns:
- "docs/.*"
extensions:
- ".go"
title:
starts-with: "BUGFIX"
ends-with: "WIP"
patterns:
- ".* Bug( )?[0-9]{5} .*"
description:
starts-with: "test PR please ignore"
ends-with: "don't review yet"
patterns:
- ".*depends on #[0-9]{1,5}.*"
ref:
match: "master"
patterns:
- "integration_v[0-9]{2}$"
comments:
count: ">10"
patch:
hunk:
starts-at: 1
pattern: "Copyright Header"
order: 5
commenter:
comment: "We have a match!"
labeler:
label: ready-for-review