Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Karel Alvarez committed Sep 27, 2023
1 parent 3159a5f commit a062d48
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion README.md
Expand Up @@ -40,7 +40,7 @@ label1:

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.

> ⚠️ This action uses [minimatch](https://www.npmjs.com/package/minimatch) to apply glob patterns.
> ⚠️ This action uses [minimatch](https://www.npmjs.com/package/minimatch) to apply glob patterns to the names of files changed.
> For historical reasons, paths starting with dot (e.g. `.github`) are not matched by default.
> You need to set `dot: true` to change this behavior.
> See [Inputs](#inputs) table below for details.
Expand Down Expand Up @@ -156,6 +156,43 @@ label1:
- path/to/folder/**
```


##### Matching based on body or title
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.


Examples 1:

```yml
slackNotify:
- "body:flagProduction"
```

Would add the label "slackNotify" if the PR has the text "flagProduction" somewhere in the description

Examples 2:

```yml
impactsRealease:
- all:
- "body:flagProduction"
- *.properties
```

Would add the label "impactsRelease" if the PR has the text "flagProduction" somewhere in the description, and affects any file with the extension "properties"

Example 3:

```yml
customer:
- all:
- "body:customer"
- "title:customer"
```

Would add the label customer if both the body and the title contain "customer"


##### Example workflow specifying Pull request numbers

```yml
Expand Down

0 comments on commit a062d48

Please sign in to comment.