Skip to content

Commit 8484a2e

Browse files
authored
Create labeler.yml
1 parent fb6988c commit 8484a2e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/labeler.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Label PR
2+
on:
3+
pull_request:
4+
types: [opened, edited]
5+
6+
jobs:
7+
label-pr:
8+
if:
9+
github.event_name == 'pull_request' &&
10+
github.event.pull_request.head.repo.fork == false
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
pr:
15+
[
16+
{ prefix: 'fix', type: 'bug' },
17+
{ prefix: 'chore', type: 'chore' },
18+
{ prefix: 'test', type: 'chore' },
19+
{ prefix: 'ci', type: 'chore' },
20+
{ prefix: 'feat', type: 'feature' },
21+
{ prefix: 'security', type: 'security' },
22+
]
23+
steps:
24+
- uses: netlify/pr-labeler-action@v1.0.0
25+
if: startsWith(github.event.pull_request.title, matrix.pr.prefix)
26+
with:
27+
token: '${{ secrets.GITHUB_TOKEN }}'
28+
label: 'type: ${{ matrix.pr.type }}'

0 commit comments

Comments
 (0)