Skip to content

Commit 6c44650

Browse files
committed
chore: enforce conventional commit messages via pre-commit
1 parent eed13f4 commit 6c44650

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
minimum_pre_commit_version: 3.2.0
2+
# Install both the pre-commit and commit-msg stage hooks on a plain
3+
# `pre-commit install` (no --hook-type flags needed).
4+
default_install_hook_types: [pre-commit, commit-msg]
5+
26
repos:
37
- repo: https://github.com/pre-commit/pre-commit-hooks
48
rev: v6.0.0
@@ -24,3 +28,12 @@ repos:
2428
- id: ruff-check
2529
args: [--exit-non-zero-on-fix]
2630
- id: ruff-format
31+
32+
# Enforce Conventional Commits locally so python-semantic-release can derive
33+
# versions and the changelog. Runs on the commit-msg stage; install it with
34+
# `pre-commit install --hook-type commit-msg` (done by `make install`).
35+
- repo: https://github.com/compilerla/conventional-pre-commit
36+
rev: v4.0.0
37+
hooks:
38+
- id: conventional-pre-commit
39+
stages: [commit-msg]

0 commit comments

Comments
 (0)