From 8a600d3c4703fbcb6ebc207f53d480b21621c626 Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Sat, 9 Nov 2024 10:49:36 +0100 Subject: [PATCH] chore: add precommit hooks and commitizen config --- .cz.toml | 6 ++++++ .pre-commit-config.yaml | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .cz.toml create mode 100644 .pre-commit-config.yaml diff --git a/.cz.toml b/.cz.toml new file mode 100644 index 0000000..7866eab --- /dev/null +++ b/.cz.toml @@ -0,0 +1,6 @@ +[tool.commitizen] +name = "cz_conventional_commits" +version_provider = "scm" +update_changelog_on_bump = true +major_version_zero = true +tag_format = "v$version" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..0e7abb9 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,20 @@ +--- +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.35.1 + hooks: + - id: yamllint + args: [-c=./.yamllint] + - repo: https://github.com/commitizen-tools/commitizen + rev: v3.30.0 + hooks: + - id: commitizen + - id: commitizen-branch + stages: + - post-commit + - push