You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ The base match object is defined as:
37
37
- all-globs-to-all-files: ['list', 'of', 'globs']
38
38
- base-branch: ['list', 'of', 'regexps']
39
39
- head-branch: ['list', 'of', 'regexps']
40
+
- title: ['list', 'of', 'regexps']
40
41
```
41
42
42
43
There are two top-level keys, `any` and `all`, which both accept the same configuration options:
@@ -49,6 +50,7 @@ There are two top-level keys, `any` and `all`, which both accept the same config
49
50
- all-globs-to-all-files: ['list', 'of', 'globs']
50
51
- base-branch: ['list', 'of', 'regexps']
51
52
- head-branch: ['list', 'of', 'regexps']
53
+
- title: ['list', 'of', 'regexps']
52
54
- all:
53
55
- changed-files:
54
56
- any-glob-to-any-file: ['list', 'of', 'globs']
@@ -57,6 +59,7 @@ There are two top-level keys, `any` and `all`, which both accept the same config
57
59
- all-globs-to-all-files: ['list', 'of', 'globs']
58
60
- base-branch: ['list', 'of', 'regexps']
59
61
- head-branch: ['list', 'of', 'regexps']
62
+
- title: ['list', 'of', 'regexps']
60
63
```
61
64
62
65
From a boolean logic perspective, top-level match objects, and options within `all` are `AND`-ed together and individual match rules within the `any` object are `OR`-ed.
@@ -65,13 +68,14 @@ One or all fields can be provided for fine-grained matching.
65
68
The fields are defined as follows:
66
69
- `all`: ALL of the provided options must match for the label to be applied
67
70
- `any`: if ANY of the provided options match then the label will be applied
68
-
- `base-branch`: match regexps against the base branch name
69
-
- `head-branch`: match regexps against the head branch name
70
71
- `changed-files`: match glob patterns against the changed paths
71
72
- `any-glob-to-any-file`: ANY glob must match against ANY changed file
72
73
- `any-glob-to-all-files`: ANY glob must match against ALL changed files
73
74
- `all-globs-to-any-file`: ALL globs must match against ANY changed file
74
75
- `all-globs-to-all-files`: ALL globs must match against ALL changed files
76
+
- `base-branch`: match regexps against the base branch name
77
+
- `head-branch`: match regexps against the head branch name
78
+
- `title`: match regexps against the pull request title
75
79
76
80
If a base option is provided without a top-level key, then it will default to `any`. More specifically, the following two configurations are equivalent:
77
81
```yml
@@ -144,6 +148,19 @@ feature:
144
148
# Add 'release' label to any PR that is opened against the `main` branch
145
149
release:
146
150
- base-branch: 'main'
151
+
152
+
# Add 'chore' label to any PR where the title starts with `chore`
153
+
chore:
154
+
- title: '^chore'
155
+
156
+
# Add 'ci' label to any PR where the title starts with `ci` or `build`:
157
+
ci:
158
+
- title: ['^ci', '^build']
159
+
160
+
# Add 'web' label to any PR where the title includes conventional commits optional scope
0 commit comments