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
+38-1
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ label1:
40
40
41
41
From a boolean logic perspective, top-level match objects are `OR`-ed together and individual match rules within an object are `AND`-ed. Combined with `!` negation, you can write complex matching rules.
42
42
43
-
> ⚠️ This action uses [minimatch](https://www.npmjs.com/package/minimatch) to apply glob patterns.
43
+
> ⚠️ This action uses [minimatch](https://www.npmjs.com/package/minimatch) to apply glob patterns to the names of files changed.
44
44
> For historical reasons, paths starting with dot (e.g. `.github`) are not matched by default.
45
45
> You need to set `dot: true` to change this behavior.
46
46
> See [Inputs](#inputs) table below for details.
@@ -156,6 +156,43 @@ label1:
156
156
- path/to/folder/**
157
157
```
158
158
159
+
160
+
##### Matching based on body or title
161
+
The match expression can also have the prefixes 'body:' or 'title:'. This are matched against the PR title and description. Can be combined like any other file name match expression.
162
+
163
+
164
+
Examples 1:
165
+
166
+
```yml
167
+
slackNotify:
168
+
- "body:flagProduction"
169
+
```
170
+
171
+
Would add the label "slackNotify" if the PR has the text "flagProduction" somewhere in the description
172
+
173
+
Examples 2:
174
+
175
+
```yml
176
+
impactsRealease:
177
+
- all:
178
+
- "body:flagProduction"
179
+
- *.properties
180
+
```
181
+
182
+
Would add the label "impactsRelease" if the PR has the text "flagProduction" somewhere in the description, and affects any file with the extension "properties"
183
+
184
+
Example 3:
185
+
186
+
```yml
187
+
customer:
188
+
- all:
189
+
- "body:customer"
190
+
- "title:customer"
191
+
```
192
+
193
+
Would add the label customer if both the body and the title contain "customer"
194
+
195
+
159
196
##### Example workflow specifying Pull request numbers
0 commit comments