Skip to content

Commit a062d48

Browse files
author
Karel Alvarez
committed
documentation
1 parent 3159a5f commit a062d48

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ label1:
4040

4141
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.
4242

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.
4444
> For historical reasons, paths starting with dot (e.g. `.github`) are not matched by default.
4545
> You need to set `dot: true` to change this behavior.
4646
> See [Inputs](#inputs) table below for details.
@@ -156,6 +156,43 @@ label1:
156156
- path/to/folder/**
157157
```
158158

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+
159196
##### Example workflow specifying Pull request numbers
160197

161198
```yml

0 commit comments

Comments
 (0)