diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 02a6bb7..eefd4b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,15 @@ +# Install the hooks in this file: +# pre-commit install --hook-type pre-commit +# pre-commit install --hook-type commit-msg +# +# (optional) test hooks for staged files: +# pre-commit run --verbose +# +# (optional) test hooks for all files: +# pre-commit run --all-files --verbose + +default_stages: [commit] + repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 @@ -20,3 +32,9 @@ repos: rev: 24.4.2 hooks: - id: black + +- repo: https://github.com/commitizen-tools/commitizen + rev: v3.28.0 + hooks: + - id: commitizen + stages: [commit-msg] diff --git a/README.md b/README.md index 589ab39..3f6ea50 100644 --- a/README.md +++ b/README.md @@ -128,13 +128,16 @@ Install [pre-commit](https://pre-commit.com/) if not already installed: python -m pip install --user pre-commit -Install pre-commit hooks in your working copy: +Install pre-commit hooks in your git working copy: - pre-commit install + pre-commit install --hook-type pre-commit + pre-commit install --hook-type commit-msg Kindly create an [issue](https://github.com/asyrjasalo/RESTinstance/issues) and then create a pull request. +Use [Conventional Commits](https://www.conventionalcommits.org/). + ### Local development Install [PDM](https://pdm-project.org/latest/):