Skip to content

Commit 6787a5c

Browse files
authored
ci: add pr labeler (#271)
1 parent e489ba3 commit 6787a5c

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/labeler.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
steps:
11+
- uses: erezrokah/[email protected]
12+
if: startsWith(github.event.pull_request.title, 'fix')
13+
with:
14+
token: '${{ secrets.GITHUB_TOKEN }}'
15+
label: 'type: bug'
16+
- uses: erezrokah/[email protected]
17+
if: startsWith(github.event.pull_request.title, 'chore') || startsWith(github.event.pull_request.title, 'ci')
18+
with:
19+
token: '${{ secrets.GITHUB_TOKEN }}'
20+
label: 'type: chore'
21+
- uses: erezrokah/[email protected]
22+
if: startsWith(github.event.pull_request.title, 'feat')
23+
with:
24+
token: '${{ secrets.GITHUB_TOKEN }}'
25+
label: 'type: feature'
26+
- uses: erezrokah/[email protected]
27+
if: startsWith(github.event.pull_request.title, 'security')
28+
with:
29+
token: '${{ secrets.GITHUB_TOKEN }}'
30+
label: 'type: security'

0 commit comments

Comments
 (0)