Skip to content

Commit af0d11c

Browse files
committed
chore(ci): automatically assign labels based on conventional commits
Uses https://github.com/marketplace/actions/assign-labels-from-conventional-commits
1 parent ced8118 commit af0d11c

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Assign Labels From Commits
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
assign-labels:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Assign labels based on conventional commits
16+
uses: mauroalderete/action-assign-labels@671a4ca2da0f900464c58b8b5540a1e07133e915 # v1.5.1
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}
19+
pull-request-number: ${{ github.event.pull_request.number }}
20+
maintain-labels-not-matched: true
21+
conventional-commits: |
22+
conventional-commits:
23+
- type: 'fix'
24+
nouns: ['fix', 'Fix', 'FIX']
25+
labels: ['bug']
26+
- type: 'feat'
27+
nouns: ['feat', 'Feat', 'FEAT', 'feature', 'Feature', 'FEATURE']
28+
labels: ['enhancement']
29+
- type: 'chore'
30+
nouns: ['chore', 'Chore', 'CHORE']
31+
labels: ['chore']
32+
- type: 'docs'
33+
nouns: ['docs', 'Docs', 'DOCS', 'doc', 'Doc', 'DOC']
34+
labels: ['docs']
35+
- type: 'breaking'
36+
nouns: ['BREAKING CHANGE', 'BREAKING CHANGES', 'breaking change', 'breaking changes']
37+
labels: ['breaking']

cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@
8585
"wazit",
8686
"whozit",
8787
"flibbertigibbet",
88-
"kerploppus"
88+
"kerploppus",
89+
"mauroalderete"
8990
],
9091
"words": ["bupkis", "deoptimization"]
9192
}

0 commit comments

Comments
 (0)