Skip to content

Commit b4f5d8b

Browse files
authored
chore: ad PR labeller (#25)
1 parent f7b0c98 commit b4f5d8b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Diff for: .github/workflows/labeler.yml

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

0 commit comments

Comments
 (0)