diff --git a/.gitignore b/.gitignore index 5cec5fb4a0..5b4e933e35 100644 --- a/.gitignore +++ b/.gitignore @@ -104,6 +104,7 @@ venv.bak/ # mypy .mypy_cache/ +.idea .vscode/ *.bak diff --git a/docs/README.md b/docs/README.md index a7d4333b1d..348bb62e43 100644 --- a/docs/README.md +++ b/docs/README.md @@ -74,6 +74,20 @@ or the shortcut cz c ``` +### Integrating with Pre-commit +Commitizen can lint your commit message for you with `cz check`. +You can integrate this in your [pre-commit](https://pre-commit.com/) config with: +```yaml +--- +repos: + - repo: https://github.com/commitizen-tools/commitizen + rev: master + hooks: + - id: commitizen + stages: [commit-msg] +``` +Read more about the `check` command [here](https://commitizen-tools.github.io/commitizen/check/). + ### Help ```bash diff --git a/docs/contributing.md b/docs/contributing.md index 14788790cb..dfbf2a9c7f 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -8,13 +8,13 @@ If you're a first-time contributor, you can check the issues with [good first is ## Before making a pull request -1. Fork [the repository](https://github.com/commitizen-tools/commitizen) -2. Clone the repository from you GitHub -3. Setup development environment through [poetry](https://python-poetry.org/) (`poetry install`) -4. Check out a new branch and add your modification -5. Add test cases for all your changes +1. Fork [the repository](https://github.com/commitizen-tools/commitizen). +2. Clone the repository from your GitHub. +3. Setup development environment through [poetry](https://python-poetry.org/) (`poetry install`). +4. Check out a new branch and add your modification. +5. Add test cases for all your changes. (We use [CodeCov](https://codecov.io/) to ensure our test coverage does not drop.) -6. Use [commitizen](https://github.com/commitizen-tools/commitizen) to do git commit -7. Run `./scripts/lint` and `./scripts/test` to ensure you follow the coding style and the tests pass -8. Update `READMD.md` and `CHANGELOG.md` for your changes +6. Use [commitizen](https://github.com/commitizen-tools/commitizen) to do git commit. +7. Run `./scripts/lint` and `./scripts/test` to ensure you follow the coding style and the tests pass. +8. Update `READMD.md` and `CHANGELOG.md` for your changes. 9. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏