Skip to content

Commit b8fc1ee

Browse files
authored
Merge pull request #210 from altusgerona/precommit-docs
Precommit docs
2 parents d651ed7 + 2f76fe9 commit b8fc1ee

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ venv.bak/
104104
# mypy
105105
.mypy_cache/
106106

107+
.idea
107108
.vscode/
108109
*.bak
109110

docs/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,20 @@ or the shortcut
7474
cz c
7575
```
7676

77+
### Integrating with Pre-commit
78+
Commitizen can lint your commit message for you with `cz check`.
79+
You can integrate this in your [pre-commit](https://pre-commit.com/) config with:
80+
```yaml
81+
---
82+
repos:
83+
- repo: https://github.com/commitizen-tools/commitizen
84+
rev: master
85+
hooks:
86+
- id: commitizen
87+
stages: [commit-msg]
88+
```
89+
Read more about the `check` command [here](https://commitizen-tools.github.io/commitizen/check/).
90+
7791
### Help
7892

7993
```bash

docs/contributing.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ If you're a first-time contributor, you can check the issues with [good first is
88

99
## Before making a pull request
1010

11-
1. Fork [the repository](https://github.com/commitizen-tools/commitizen)
12-
2. Clone the repository from you GitHub
13-
3. Setup development environment through [poetry](https://python-poetry.org/) (`poetry install`)
14-
4. Check out a new branch and add your modification
15-
5. Add test cases for all your changes
11+
1. Fork [the repository](https://github.com/commitizen-tools/commitizen).
12+
2. Clone the repository from your GitHub.
13+
3. Setup development environment through [poetry](https://python-poetry.org/) (`poetry install`).
14+
4. Check out a new branch and add your modification.
15+
5. Add test cases for all your changes.
1616
(We use [CodeCov](https://codecov.io/) to ensure our test coverage does not drop.)
17-
6. Use [commitizen](https://github.com/commitizen-tools/commitizen) to do git commit
18-
7. Run `./scripts/lint` and `./scripts/test` to ensure you follow the coding style and the tests pass
19-
8. Update `READMD.md` and `CHANGELOG.md` for your changes
17+
6. Use [commitizen](https://github.com/commitizen-tools/commitizen) to do git commit.
18+
7. Run `./scripts/lint` and `./scripts/test` to ensure you follow the coding style and the tests pass.
19+
8. Update `READMD.md` and `CHANGELOG.md` for your changes.
2020
9. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏

0 commit comments

Comments
 (0)