Skip to content

Commit

Permalink
ci: Extend commitlint configuration with conventional commits
Browse files Browse the repository at this point in the history
There was an issue that the exclamation mark wasn't parsed properly.
For example, the commit message "feat!: Test" was declined, but is valid.
  • Loading branch information
MoritzWeber0 committed Jan 29, 2024
1 parent f4ad776 commit aa5e295
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ rules:
always,
[build, chore, ci, docs, feat, fix, merge, perf, refactor, revert, test],
]
extends:
- '@commitlint/config-conventional'
2 changes: 1 addition & 1 deletion .github/workflows/commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
fetch-depth: 0
- name: Install commitlint
run: npm install -g @commitlint/cli
run: npm install -g @commitlint/cli @commitlint/config-conventional
- name: Validate commit messages
id: conventional-commits
env:
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ repos:
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies:
- '@commitlint/config-conventional'
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
Expand Down

0 comments on commit aa5e295

Please sign in to comment.