diff --git a/.cz.toml b/.cz.toml new file mode 100644 index 0000000..26d453c --- /dev/null +++ b/.cz.toml @@ -0,0 +1,5 @@ +[tool.commitizen] +name = "cz_conventional_commits" +tag_format = "v$version" +version_scheme = "semver" +version_provider = "scm" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..3105af7 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: +- hooks: + - id: commitizen + - id: commitizen-branch + stages: + - push + repo: https://github.com/commitizen-tools/commitizen + rev: v4.4.1 diff --git a/README.md b/README.md index ce8b529..cd435eb 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,16 @@ Where `` is one of: - `test`: Adding or refactoring tests - `chore`: Updating build tasks, etc; no production code change +You may use [commitizen](https://commitizen-tools.github.io/commitizen/) to automatically validate or write your commits: + +After installing [commitizen](https://commitizen-tools.github.io/commitizen/) you may commit with: +``` +cz c +``` +This will automatically ask you some questions and generate a semantic commit for you. + +You may additionally install [pre-commit](https://pre-commit.com/). This will automatically validate your commits before push and commiting. + Examples: ``` feat: add user balance display