Skip to content

Commit

Permalink
ci: assign label based on conventional commits
Browse files Browse the repository at this point in the history
  • Loading branch information
cheina97 committed Dec 18, 2024
1 parent bf0d37b commit 55b1e0f
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Conventional Commit Labels
on:
pull_request_target:
types: [opened, synchronize, reopened]

jobs:
assign-labels:
runs-on: ubuntu-latest
name: Assign labels in pull request
if: github.event.pull_request.merged == false
steps:
- name: Execute assign labels
id: action-assign-labels
uses: mauroalderete/action-assign-labels@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
conventional-commits: |
conventional-commits:
- type: 'fix'
nouns: ['FIX', 'Fix', 'fix', 'FIXED', 'Fixed', 'fixed']
labels: ['fix']
- type: 'feature'
nouns: ['FEATURE', 'Feature', 'feature', 'FEAT', 'Feat', 'feat']
labels: ['feature']
- type: 'build'
nouns: ['BUILD', 'Build', 'build']
labels: ['build']
- type: 'chore'
nouns: ['CHORE', 'Chore', 'chore']
labels: ['chore']
- type: 'ci'
nouns: ['CI', 'Ci', 'ci']
labels: ['ci']
- type: 'docs'
nouns: ['DOCS', 'Docs', 'docs']
labels: ['documentation']
- type: 'style'
nouns: ['STYLE', 'Style', 'style']
labels: ['style']
- type: 'refactor'
nouns: ['REFACTOR', 'Refactor', 'refactor']
labels: ['refactor']
- type: 'perf'
nouns: ['PERF', 'Perf', 'perf']
labels: ['performance']
- type: 'test'
nouns: ['TEST', 'Test', 'test']
labels: ['test']

0 comments on commit 55b1e0f

Please sign in to comment.