Skip to content

Commit ec5b90b

Browse files
committed
ci(gh-action): add pr label job
1 parent 95e7057 commit ec5b90b

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
changelog:
2+
categories:
3+
- title: 🎁 Features
4+
labels:
5+
- '*'
6+
exclude:
7+
labels:
8+
- dependencies
9+
- fix
10+
- title: 🔧 Fixes
11+
labels:
12+
- fix
13+
- title: 📦 Dependencies
14+
labels:
15+
- dependencies

.github/workflows/pr-label.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
pull_request:
3+
types: [opened, edited]
4+
5+
jobs:
6+
label_regex:
7+
runs-on: ubuntu-latest
8+
name: Add label
9+
steps:
10+
- name: "Assign fix label to new Pull Request"
11+
uses: Bhacaz/label-regex@v2
12+
with:
13+
field: title
14+
regex: '(fix+?)'
15+
lowercase: true
16+
token: ${{ github.token }}
17+
- name: "Assign feat label to new Pull Request"
18+
uses: Bhacaz/label-regex@v2
19+
with:
20+
field: title
21+
regex: '(feat+?)'
22+
lowercase: true
23+
token: ${{ github.token }}
24+
- name: "Assign chore label to new Pull Request"
25+
uses: Bhacaz/label-regex@v2
26+
with:
27+
field: title
28+
regex: '(chore+?)'
29+
lowercase: true
30+
token: ${{ github.token }}
31+
- name: "Assign ci label to new Pull Request"
32+
uses: Bhacaz/label-regex@v2
33+
with:
34+
field: title
35+
regex: '(ci+?)'
36+
lowercase: true
37+
token: ${{ github.token }}

0 commit comments

Comments
 (0)