Skip to content

Commit f67d20e

Browse files
ci: restrict conventional commit types to used set
Both the pre-commit hook and the GitHub workflow for conventional commits accepted any type string. Restrict both to the 8 types actually used in this repo: chore, ci, docs, feat, fix, refactor, revert, test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0c6a4eb commit f67d20e

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/conventional-commits.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,13 @@ jobs:
1212
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6
1313
env:
1414
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
with:
16+
types: |
17+
chore
18+
ci
19+
docs
20+
feat
21+
fix
22+
refactor
23+
revert
24+
test

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ repos:
1111
hooks:
1212
- id: conventional-pre-commit
1313
stages: [commit-msg]
14+
args:
15+
- chore
16+
- ci
17+
- docs
18+
- feat
19+
- fix
20+
- refactor
21+
- revert
22+
- test
1423

1524
- repo: local
1625
hooks:

0 commit comments

Comments
 (0)