Skip to content

Commit 86e513b

Browse files
committed
ci: assign label based on conventional commits
1 parent 983e9a9 commit 86e513b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/labels.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Conventional Commit Labels
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited]
6+
7+
jobs:
8+
validate-pr-title:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Execute assign labels
12+
id: action-assign-labels
13+
uses: mauroalderete/action-assign-labels@v1
14+
with:
15+
pull-request-number: ${{ github.event.pull_request.number }}
16+
github-token: ${{ secrets.GITHUB_TOKEN }}
17+
conventional-commits: |
18+
conventional-commits:
19+
- type: 'fix'
20+
nouns: ['FIX', 'Fix', 'fix', 'FIXED', 'Fixed', 'fixed']
21+
labels: ['bug']
22+
- type: 'feature'
23+
nouns: ['FEATURE', 'Feature', 'feature', 'FEAT', 'Feat', 'feat']
24+
labels: ['feature']
25+
- type: 'breaking_change'
26+
nouns: ['BREAKING CHANGE', 'BREAKING', 'MAJOR']
27+
labels: ['BREAKING CHANGE']
28+
maintain-labels-not-matched: false
29+
apply-changes: true

0 commit comments

Comments
 (0)