From 97391b644529a98302e69f3dc7de64c22dc26fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20N=C3=BA=C3=B1ez=20Arroyo?= Date: Mon, 8 Jun 2026 21:31:15 -0300 Subject: [PATCH] build: add commitizen to pre-commit and document guidelines --- .pre-commit-config.yaml | 8 +- docs/source/contributing/commits.md | 165 ++++++++++++++++++++++++ docs/source/contributing/development.md | 3 +- pyproject.toml | 6 + 4 files changed, 179 insertions(+), 3 deletions(-) create mode 100644 docs/source/contributing/commits.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index be5393e490..c760e2419c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -default_stages: [pre-commit, pre-push] +default_stages: [pre-commit, pre-push, commit-msg] fail_fast: false exclude: ^(manim/grpc/gen/|docs/i18n/) repos: @@ -43,3 +43,9 @@ repos: types-setuptools, ] files: ^manim/ + + - repo: https://github.com/commitizen-tools/commitizen + rev: v3.27.0 + hooks: + - id: commitizen + stages: [commit-msg] diff --git a/docs/source/contributing/commits.md b/docs/source/contributing/commits.md new file mode 100644 index 0000000000..d7bfe9318d --- /dev/null +++ b/docs/source/contributing/commits.md @@ -0,0 +1,165 @@ +## Commit Message Format + +We have precise rules over how our Git commit messages must be formatted. +This format leads to **easier to read commit history** and enables automated changelog generation and semantic versioning. + +Each commit message consists of a **header**, a **body**, and a **footer**. + +``` +
+ + + +