From f5e11338e64096ec8252e86d96f7f9d373c4460a Mon Sep 17 00:00:00 2001 From: Alexandre Gerona Date: Sat, 27 Jun 2020 22:52:24 +0800 Subject: [PATCH 1/4] build(.gitignore): Add .idea to .gitignore To cater to Jetbrains IDE users. --- .gitignore | 1 + 1 file changed, 1 insertion(+) 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 From 48c97b5d41a3c0b9166ec0d8943c10c9cd642bd6 Mon Sep 17 00:00:00 2001 From: Alexandre Gerona Date: Sat, 27 Jun 2020 22:54:57 +0800 Subject: [PATCH 2/4] docs(contributing.md): Correct typos and sentences --- docs/contributing.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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) 🙏 From 6ec81699e91e19c3924395e50bc92e5074522de8 Mon Sep 17 00:00:00 2001 From: Alexandre Gerona Date: Sat, 27 Jun 2020 22:55:46 +0800 Subject: [PATCH 3/4] docs(README.md): Add pre-commit integration information in README.md --- docs/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/README.md b/docs/README.md index a7d4333b1d..e5fe2ae2c5 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: v1.17.0 + hooks: + - id: commitizen + stages: [commit-msg] +``` +Read more about the `check` command [here](https://commitizen-tools.github.io/commitizen/check/). + ### Help ```bash From 2f76fe9a87e2b54d88fca78ad3a6bc1d57c6f7c5 Mon Sep 17 00:00:00 2001 From: Alexandre Gerona Date: Tue, 30 Jun 2020 13:23:16 +0800 Subject: [PATCH 4/4] docs(README): Change commitizen rev recommendation for pre-commit integration --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index e5fe2ae2c5..348bb62e43 100644 --- a/docs/README.md +++ b/docs/README.md @@ -81,7 +81,7 @@ You can integrate this in your [pre-commit](https://pre-commit.com/) config with --- repos: - repo: https://github.com/commitizen-tools/commitizen - rev: v1.17.0 + rev: master hooks: - id: commitizen stages: [commit-msg]