Files
labeler/README.md
T

33 lines
595 B
Markdown
Raw Permalink Normal View History

2019-08-08 10:08:00 -04:00
# Pull Request Labeler
2019-03-29 15:21:48 -07:00
2019-08-08 10:08:00 -04:00
Pull request labeler triages PRs based on the paths that are modified in the PR.
2019-03-29 15:21:48 -07:00
2019-08-08 10:08:00 -04:00
To use, create a `.github/labeler.yml` file with a list of labels and [minimatch](https://github.com/isaacs/minimatch)
globs to match to apply the label.
2019-03-29 15:21:48 -07:00
2019-08-08 10:08:00 -04:00
Example:
2019-03-29 15:21:48 -07:00
```
2019-08-08 10:08:00 -04:00
label1:
- example1/**/*
2019-03-29 15:21:48 -07:00
2019-08-08 10:08:00 -04:00
label2: example2/*
2019-03-29 15:21:48 -07:00
2019-08-08 10:08:00 -04:00
label3:
- example3/*
- example3/**/*.yml
```
Then create a workflow:
```
name: "Pull Request Labeler"
on:
- pull-request
jobs:
triage:
runs-on: ubuntu-latest
steps:
2019-08-08 11:14:29 -04:00
- uses: actions/labeler@v2
2019-08-08 10:08:00 -04:00
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2019-03-29 15:21:48 -07:00
```