Skip to content

Commit ced094b

Browse files
committed
docs: add missing settings to config
1 parent e998a2f commit ced094b

File tree

3 files changed

+40
-34
lines changed

3 files changed

+40
-34
lines changed

docs/bump.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,11 +487,13 @@ release. During execution of the script, some environment variables are availabl
487487
| `CZ_POST_INCREMENT` | Whether this wass a `MAJOR`, `MINOR` or `PATH` release |
488488
| `CZ_POST_CHANGELOG_FILE_NAME` | Path to the changelog file, if available |
489489
490-
````toml
490+
```toml
491491
[tool.commitizen]
492492
post_bump_hooks = [
493493
"scripts/slack_notification.sh"
494494
]
495+
```
496+
495497
### `prerelease_offset`
496498
497499
Offset with which to start counting prereleses.
@@ -501,7 +503,7 @@ Defaults to: `0`
501503
```toml
502504
[tool.commitizen]
503505
prerelease_offset = 1
504-
````
506+
```
505507
506508
### `version_type`
507509

docs/check.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ $ cz check --commit-msg-file COMMIT_MSG_FILE
5454
```
5555

5656
In this option, COMMIT_MSG_FILE is the path of the temporal file that contains the commit message.
57-
This argument can be useful when cooperating with git hook, please check [Automatically check message before commit](auto_check.md) for more information about how to use this argument with git hook.
57+
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.
5858

5959
### Allow Abort
6060

docs/config.md

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,30 @@
22

33
## Settings
44

5-
| Variable | Type | Default | Description |
6-
|----------------------------|--------|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
7-
| `name` | `str` | `"cz_conventional_commits"` | Name of the committing rules to use |
8-
| `version` | `str` | `None` | Current version. Example: "0.1.2" |
9-
| `version_files` | `list` | `[ ]` | Files were the version will be updated. A pattern to match a line, can also be specified, separated by `:` [See more][version_files] |
10-
| `version_provider` | `str` | `commitizen` | Version provider used to read and write version [See more](#version-providers) |
11-
| `tag_format` | `str` | `None` | Format for the git tag, useful for old projects, that use a convention like `"v1.2.1"`. [See more][tag_format] |
12-
| `update_changelog_on_bump` | `bool` | `false` | Create changelog when running `cz bump` |
13-
| `gpg_sign` | `bool` | `false` | Use gpg signed tags instead of lightweight tags. |
14-
| `annotated_tag` | `bool` | `false` | Use annotated tags instead of lightweight tags. [See difference][annotated-tags-vs-lightweight] |
15-
| `bump_message` | `str` | `None` | Create custom commit message, useful to skip ci. [See more][bump_message] |
16-
| `allow_abort` | `bool` | `false` | Disallow empty commit messages, useful in ci. [See more][allow_abort] |
17-
| `changelog_file` | `str` | `CHANGELOG.md` | filename of exported changelog |
18-
| `changelog_incremental` | `bool` | `false` | Update changelog with the missing versions. This is good if you don't want to replace previous versions in the file. Note: when doing `cz bump --changelog` this is automatically set to `true` |
19-
| `changelog_start_rev` | `str` | `None` | Start from a given git rev to generate the changelog |
20-
| `changelog_merge_prerelease` | `bool` | `false` | Collect all changes of prerelease versions into the next non-prerelease version when creating the changelog. |
21-
| `style` | `list` | see above | Style for the prompts (It will merge this value with default style.) [See More (Styling your prompts with your favorite colors)][additional-features] |
22-
| `customize` | `dict` | `None` | **This is only supported when config through `toml`.** Custom rules for committing and bumping. [See more][customization] |
23-
| `use_shortcuts` | `bool` | `false` | If enabled, commitizen will show keyboard shortcuts when selecting from a list. Define a `key` for each of your choices to set the key. [See more][shortcuts] |
24-
| `major_version_zero` | `bool` | `false` | When true, breaking changes on a `0.x` will remain as a `0.x` version. On `false`, a breaking change will bump a `0.x` version to `1.0`. [major-version-zero] |
25-
| `prerelease_offset` | `int` | `0` | In special cases it may be necessary that a prerelease cannot start with a 0, e.g. in an embedded project the individual characters are encoded in bytes. This can be done by specifying an offset from which to start counting. [prerelease-offset] |
26-
| `version_type` | `str` | `pep440` | Select a version type from the following options [`pep440`, `semver`]. Useful for non-python projects. [See more][version_type] |
5+
| Variable | Type | Default | Description |
6+
| ---------------------------- | ----------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7+
| `name` | `str` | `"cz_conventional_commits"` | Name of the committing rules to use |
8+
| `version` | `str` | `None` | Current version. Example: "0.1.2" |
9+
| `version_files` | `list` | `[ ]` | Files were the version will be updated. A pattern to match a line, can also be specified, separated by `:` [Read more][version_files] |
10+
| `version_provider` | `str` | `commitizen` | Version provider used to read and write version [Read more](#version-providers) |
11+
| `tag_format` | `str` | `None` | Format for the git tag, useful for old projects, that use a convention like `"v1.2.1"`. [Read more][tag_format] |
12+
| `update_changelog_on_bump` | `bool` | `false` | Create changelog when running `cz bump` |
13+
| `gpg_sign` | `bool` | `false` | Use gpg signed tags instead of lightweight tags. |
14+
| `annotated_tag` | `bool` | `false` | Use annotated tags instead of lightweight tags. [See difference][annotated-tags-vs-lightweight] |
15+
| `bump_message` | `str` | `None` | Create custom commit message, useful to skip ci. [Read more][bump_message] |
16+
| `allow_abort` | `bool` | `false` | Disallow empty commit messages, useful in ci. [Read more][allow_abort] |
17+
| `changelog_file` | `str` | `CHANGELOG.md` | filename of exported changelog |
18+
| `changelog_incremental` | `bool` | `false` | Update changelog with the missing versions. This is good if you don't want to replace previous versions in the file. Note: when doing `cz bump --changelog` this is automatically set to `true` |
19+
| `changelog_start_rev` | `str` | `None` | Start from a given git rev to generate the changelog |
20+
| `changelog_merge_prerelease` | `bool` | `false` | Collect all changes of prerelease versions into the next non-prerelease version when creating the changelog. |
21+
| `style` | `list` | see above | Style for the prompts (It will merge this value with default style.) [See More (Styling your prompts with your favorite colors)][additional-features] |
22+
| `customize` | `dict` | `None` | **This is only supported when config through `toml`.** Custom rules for committing and bumping. [Read more][customization] |
23+
| `use_shortcuts` | `bool` | `false` | If enabled, commitizen will show keyboard shortcuts when selecting from a list. Define a `key` for each of your choices to set the key. [Read more][shortcuts] |
24+
| `major_version_zero` | `bool` | `false` | When true, breaking changes on a `0.x` will remain as a `0.x` version. On `false`, a breaking change will bump a `0.x` version to `1.0`. [major-version-zero] |
25+
| `prerelease_offset` | `int` | `0` | In some circumstances, a prerelease cannot start with a 0, e.g. in an embedded project individual characters are encoded as bytes. This can be done by specifying an offset from which to start counting. [prerelease-offset] |
26+
| `version_type` | `str` | `pep440` | Select a version type from the following options [`pep440`, `semver`]. Useful for non-python projects. [Read more][version_type] |
27+
| `pre_bump_hooks` | `list[str]` | `[]` | Calls the hook scripts **before** bumping version. [Read more][pre_bump_hooks] |
28+
| `post_bump_hooks` | `list[str]` | `[]` | Calls the hook scripts **after** bumping the version. [Read more][post_bump_hooks] |
2729

2830
## pyproject.toml or .cz.toml
2931

@@ -123,18 +125,18 @@ But you can use any `commitizen.provider` entrypoint as value for `version_provi
123125

124126
Commitizen provides some version providers for some well known formats:
125127

126-
| name | description |
127-
| ---- | ----------- |
128+
| name | description |
129+
| ------------ | --------------------------------------------------------------------- |
128130
| `commitizen` | Default version provider: Fetch and set version in commitizen config. |
129-
| `scm` | Fetch the version from git and does not need to set it back |
130-
| `pep621` | Get and set version from `pyproject.toml` `project.version` field |
131-
| `poetry` | Get and set version from `pyproject.toml` `tool.poetry.version` field |
132-
| `cargo` | Get and set version from `Cargo.toml` `project.version` field |
133-
| `npm` | Get and set version from `package.json` `project.version` field |
134-
| `composer` | Get and set version from `composer.json` `project.version` field |
131+
| `scm` | Fetch the version from git and does not need to set it back |
132+
| `pep621` | Get and set version from `pyproject.toml` `project.version` field |
133+
| `poetry` | Get and set version from `pyproject.toml` `tool.poetry.version` field |
134+
| `cargo` | Get and set version from `Cargo.toml` `project.version` field |
135+
| `npm` | Get and set version from `package.json` `project.version` field |
136+
| `composer` | Get and set version from `composer.json` `project.version` field |
135137

136138
!!! note
137-
The `scm` provider is meant to be used with `setuptools-scm` or any packager `*-scm` plugin.
139+
The `scm` provider is meant to be used with `setuptools-scm` or any packager `*-scm` plugin.
138140

139141
### Custom version provider
140142

@@ -181,6 +183,8 @@ setup(
181183
[prerelease-offset]: bump.md#-prerelease_offset
182184
[allow_abort]: check.md#allow-abort
183185
[version_type]: bump.md#version_type
186+
[pre_bump_hooks]: bump.md#pre_bump_hooks
187+
[post_bump_hooks]: bump.md#post_bump_hooks
184188
[additional-features]: https://github.com/tmbo/questionary#additional-features
185189
[customization]: customization.md
186190
[shortcuts]: customization.md#shortcut-keys

0 commit comments

Comments
 (0)