Skip to content

Commit 8cb1e22

Browse files
Kurt-von-LavenLee-W
authored andcommitted
ci(pre-commit): Check existing commit messages
Use new commitizen-branch hook to verify correctness of existing commit messages post-commit and pre-push. This guards against cherry-picked commits with invalid commit messages as well as empty commit messages (e.g., created with git commit --allow-empty-message).
1 parent 1f0535a commit 8cb1e22

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.pre-commit-config.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ repos:
1717
rev: v2.32.2 # automatically updated by Commitizen
1818
hooks:
1919
- id: commitizen
20+
- id: commitizen-branch
21+
stages:
22+
- post-commit
23+
- push
2024

2125
- repo: local
2226
hooks:

0 commit comments

Comments
 (0)