You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, if you'd like to check all commits on a branch, you can use `--rev-range master..HEAD`. Or, if you'd like to check all commits starting from when you first implemented commit message linting, you can use `--rev-range <first_commit_sha>..HEAD`.
29
29
30
-
For more info on how git commit ranges work, you can check the [git documentation](https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection#_commit_ranges).
30
+
For more information on how git commit ranges work, you can check the [git documentation](https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection#_commit_ranges).
31
31
32
32
### Commit Message
33
33
@@ -47,16 +47,16 @@ In this option, MESSAGE is the commit message to be checked.
47
47
$ echo MESSAGE | cz check
48
48
```
49
49
50
-
In this option, MESSAGE is piped to cz check and would be checked.
50
+
In this option, MESSAGE is piped to cz check and will be checked.
51
51
52
52
### Commit Message File
53
53
54
54
```bash
55
55
$ cz check --commit-msg-file COMMIT_MSG_FILE
56
56
```
57
57
58
-
In this option, COMMIT_MSG_FILE is the path of the temporal file that contains the commit message.
59
-
This argument can be useful when cooperating with git hook, please check [Automatically check message before commit](../tutorials/auto_check.md) for more information about how to use this argument with git hook.
58
+
In this option, COMMIT_MSG_FILE is the path of the temporary file that contains the commit message.
59
+
This argument can be useful when cooperating with git hooks. Please check [Automatically check message before commit](../tutorials/auto_check.md) for more information about how to use this argument with git hooks.
60
60
61
61
### Allow Abort
62
62
@@ -69,19 +69,19 @@ permit them. Since `git commit` accepts an `--allow-empty-message` flag (primari
69
69
70
70
### Allowed Prefixes
71
71
72
-
If the commit message starts by some specific prefixes, `cz check` returns `True` without checkign the regex.
73
-
By default, the the following prefixes are allowed: `Merge`, `Revert`, `Pull request`, `fixup!` and `squash!`.
72
+
If the commit message starts with some specific prefixes, `cz check` returns `True` without checking the regex.
73
+
By default, the following prefixes are allowed: `Merge`, `Revert`, `Pull request`, `fixup!` and `squash!`.
2. Install [gpg](https://gnupg.org), installation [pages](https://gnupg.org/documentation/manuals/gnupg/Installation.html#Installation). For Mac users, you could try[homebrew](https://brew.sh/).
11
+
1. Install [poetry](https://python-poetry.org/)`>=2.0.0`. See installation [pages](https://python-poetry.org/docs/#installing-with-the-official-installer).
12
+
2. Install [gpg](https://gnupg.org). See installation [pages](https://gnupg.org/documentation/manuals/gnupg/Installation.html#Installation). For Mac users, you can use[homebrew](https://brew.sh/).
5. Check out a new branch and add your modification.
21
-
6. Add test cases for all your changes.
17
+
1. Clone the repository from your GitHub.
18
+
1. Set up development environment through [poetry](https://python-poetry.org/) (`poetry install`).
19
+
1. Set up [pre-commit](https://pre-commit.com/) hook (`poetry setup-pre-commit`).
20
+
1. Checkout a new branch and add your modifications.
21
+
1. Add test cases for all your changes.
22
22
(We use [CodeCov](https://codecov.io/) to ensure our test coverage does not drop.)
23
-
7. Use [commitizen](https://github.com/commitizen-tools/commitizen) to do git commit. We follow [conventional commits](https://www.conventionalcommits.org/).
24
-
8. Run `poetry all` to ensure you follow the coding style and the tests pass.
25
-
9. Optionally, update the `./docs/README.md` or `docs/images/cli_help` (through running `poetry doc:screenshots`).
26
-
9.**Do not** update the `CHANGELOG.md`, it will be automatically created after merging to `master`.
27
-
10.**Do not** update the versions in the project, they will be automatically updated.
28
-
10. If your changes are about documentation. Run`poetry doc` to serve documentation locally and check whether there is any warning or error.
29
-
11. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏
23
+
1. Use [commitizen](https://github.com/commitizen-tools/commitizen) to do git commit. We follow [conventional commits](https://www.conventionalcommits.org/).
24
+
1. Run `poetry all` to ensure you follow the coding style and the tests pass.
25
+
1. Optionally, update the `./docs/README.md` or `docs/images/cli_help` (through running `poetry doc:screenshots`).
26
+
1.**Do not** update the `CHANGELOG.md`; it will be automatically created after merging to `master`.
27
+
1.**Do not** update the versions in the project; they will be automatically updated.
28
+
1. If your changes are about documentation, run`poetry doc` to serve documentation locally and check whether there are any warnings or errors.
29
+
1. Send a [pull request](https://github.com/commitizen-tools/commitizen/pulls) 🙏
30
30
31
31
## Use of GitHub Labels
32
32
@@ -45,8 +45,8 @@ If you're a first-time contributor, you can check the issues with [good first is
| `type` | `str` | `None` | The type of questions. Valid types: `list`, `select`, `input` and etc. The `select` type provides an interactive searchable list interface. [See More][different-question-types] |
173
+
| `type` | `str` | `None` | The type of questions. Valid types: `list`, `select`, `input`, etc. The `select` type provides an interactive searchable list interface. [See More][different-question-types] |
174
174
| `name` | `str` | `None` | The key for the value answered by user. It's used in `message_template` |
175
175
| `message` | `str` | `None` | Detail description for the question. |
176
176
| `choices` | `list` | `None` | (OPTIONAL) The choices when `type = list` or `type = select`. Either use a list of values or a list of dictionaries with `name` and `value` keys. Keyboard shortcuts can be defined via `key`. See examples above. |
@@ -192,10 +192,10 @@ To specify keyboard shortcuts for your custom choices, provide the shortcut usin
192
192
193
193
The basic steps are:
194
194
195
-
1. Inheriting from `BaseCommitizen`
195
+
1. Inheriting from `BaseCommitizen`.
196
196
2. Give a name to your rules.
197
-
3. Create a python package using `setup.py`, `poetry`, etc
198
-
4. Expose the class as a `commitizen.plugin` entrypoint
197
+
3. Create a python package using `setup.py`, `poetry`, etc.
198
+
4. Expose the class as a `commitizen.plugin` entrypoint.
199
199
200
200
Check an [example][convcomms] on how to configure `BaseCommitizen`.
201
201
@@ -322,9 +322,9 @@ You can customize it of course, and this are the variables you need to add to yo
322
322
| `commit_parser` | `str` | NO | Regex which should provide the variables explained in the [changelog description][changelog-des] |
323
323
| `changelog_pattern` | `str` | NO | Regex to validate the commits, this is useful to skip commits that don't meet your ruling standards like a Merge. Usually the same as bump_pattern |
324
324
| `change_type_map` | `dict` | NO | Convert the title of the change type that will appear in the changelog, if a value is not found, the original will be provided |
325
-
| `changelog_message_builder_hook` | `method: (dict, git.GitCommit) -> dict | list | None` | NO | Customize with extra information your message output, like adding links, this function is executed per parsed commit. Each GitCommit contains the following attrs: `rev`, `title`, `body`, `author`, `author_email`. Returning a falsy value ignore the commit. |
325
+
| `changelog_message_builder_hook` | `method: (dict, git.GitCommit) -> dict \| list \| None` | NO | Customize with extra information your message output, like adding links, this function is executed per parsed commit. Each GitCommit contains the following attrs: `rev`, `title`, `body`, `author`, `author_email`. Returning a falsy value ignore the commit. |
326
326
| `changelog_hook` | `method: (full_changelog: str, partial_changelog: Optional[str]) -> str` | NO | Receives the whole and partial (if used incremental) changelog. Useful to send slack messages or notify a compliance department. Must return the full_changelog |
327
-
| `changelog_release_hook` | `method: (release: dict, tag: git.GitTag) -> dict` | NO | Receives each generated changelog release and its associated tag. Useful to enrich a releases before they are rendered. Must return the update release
327
+
| `changelog_release_hook` | `method: (release: dict, tag: git.GitTag) -> dict` | NO | Receives each generated changelog release and its associated tag. Useful to enrich releases before they are rendered. Must return the update release
328
328
329
329
```python
330
330
from commitizen.cz.base import BaseCommitizen
@@ -395,7 +395,7 @@ class NoSubjectProvidedException(CzException):
395
395
Commitizen migrated to a new plugin format relying on `importlib.metadata.EntryPoint`.
396
396
Migration should be straight-forward for legacy plugins:
397
397
398
-
- Remove the `discover_this` line from you plugin module
398
+
- Remove the `discover_this` line from your plugin module
399
399
- Expose the plugin class under as a `commitizen.plugin` entrypoint.
400
400
401
401
The name of the plugin is now determined by the name of the entrypoint.
@@ -455,12 +455,12 @@ By default, the template used is the `CHANGELOG.md.j2` file from the commitizen
455
455
456
456
### Providing a template with your customization class
457
457
458
-
There is 3 parameters available to change the template rendering from your custom `BaseCommitizen`.
458
+
There are 3 parameters available to change the template rendering from your custom `BaseCommitizen`.
0 commit comments