Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a0c6913

Browse files
committed
docs(config.md): fix format issue, add period and add title to example config code blocks
1 parent 6b4f8b0 commit a0c6913

File tree

1 file changed

+84
-104
lines changed

1 file changed

+84
-104
lines changed

docs/config.md

Lines changed: 84 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -4,244 +4,224 @@
44

55
### `name`
66

7-
Type: `str`
7+
- Type: `str`
8+
- Default: `"cz_conventional_commits"`
89

9-
Default: `"cz_conventional_commits"`
10-
11-
Name of the committing rules to use
10+
Name of the committing rules to use.
1211

1312
### `version`
1413

15-
Type: `str`
16-
17-
Default: `None`
14+
- Type: `str`
15+
- Default: `None`
1816

19-
Current version. Example: "0.1.2". Required if you use `version_provider = "commitizen"`.
17+
Current version. Example: `"0.1.2"`. Required if you use `version_provider = "commitizen"`.
2018

2119
### `version_files`
2220

23-
Type: `list`
21+
- Type: `list`
22+
- Default: `[]`
2423

25-
Default: `[ ]`
26-
27-
Files were the version will be updated. A pattern to match a line, can also be specified, separated by `:` [Read more][version_files]
24+
Files were the version will be updated. A pattern to match a line, can also be specified, separated by `:`. [Read more][version_files]
2825

2926
### `version_provider`
3027

31-
Type: `str`
32-
33-
Default: `commitizen`
28+
- Type: `str`
29+
- Default: `commitizen`
3430

35-
Version provider used to read and write version [Read more](#version-providers)
31+
Version provider used to read and write version. [Read more](#version-providers)
3632

3733
### `version_scheme`
3834

39-
Type: `str`
35+
- Type: `str`
36+
- Default: `pep440`
4037

41-
Default: `pep440`
38+
Select a version scheme from the following options:
39+
40+
- `pep440`
41+
- `semver`
42+
- `semver2`
4243

43-
Select a version scheme from the following options [`pep440`, `semver`, `semver2`].
4444
Useful for non-python projects. [Read more][version-scheme]
4545

4646
### `tag_format`
4747

48-
Type: `str`
49-
50-
Default: `$version`
48+
- Type: `str`
49+
- Default: `$version`
5150

5251
Format for the git tag, useful for old projects, that use a convention like `"v1.2.1"`. [Read more][tag_format]
5352

5453
### `legacy_tag_formats`
5554

56-
Type: `list`
57-
58-
Default: `[ ]`
55+
- Type: `list`
56+
- Default: `[]`
5957

6058
Legacy git tag formats, useful for old projects that changed tag format.
6159
Tags matching those formats will be recognized as version tags and be included in the changelog.
6260
Each entry uses the syntax as [`tag_format`](#tag_format). [Read more][tag_format]
6361

6462
### `ignored_tag_formats`
6563

66-
Type: `list`
67-
68-
Default: `[ ]`
64+
- Type: `list`
65+
- Default: `[]`
6966

7067
Tags matching those formats will be totally ignored and won't raise a warning.
7168
Each entry uses the syntax as [`tag_format`](#tag_format) with the addition of `*`
7269
that will match everything (non-greedy). [Read more][tag_format]
7370

7471
### `update_changelog_on_bump`
7572

76-
Type: `bool`
73+
- Type: `bool`
74+
- Default: `False`
7775

78-
Default: `false`
79-
80-
Create changelog when running `cz bump`
76+
Create changelog when running `cz bump`.
8177

8278
### `gpg_sign`
8379

84-
Type: `bool`
85-
86-
Default: `false`
80+
- Type: `bool`
81+
- Default: `False`
8782

8883
Use gpg signed tags instead of lightweight tags.
8984

9085
### `annotated_tag`
9186

92-
Type: `bool`
93-
94-
Default: `false`
87+
- Type: `bool`
88+
- Default: `False`
9589

9690
Use annotated tags instead of lightweight tags. [See difference][annotated-tags-vs-lightweight]
9791

9892
### `bump_message`
9993

100-
Type: `str`
101-
102-
Default: `None`
94+
- Type: `str`
95+
- Default: `None`
10396

104-
Create custom commit message, useful to skip CI. [Read more][bump_message]
97+
Create custom commit message. Useful to skip CI. [Read more][bump_message]
10598

10699
### `retry_after_failure`
107100

108-
Type: `bool`
109-
110-
Default: `false`
101+
- Type: `bool`
102+
- Default: `False`
111103

112104
Automatically retry failed commit when running `cz commit`. [Read more][retry_after_failure]
113105

114106
### `allow_abort`
115107

116-
Type: `bool`
117-
118-
Default: `false`
108+
- Type: `bool`
109+
- Default: `False`
119110

120-
Disallow empty commit messages, useful in CI. [Read more][allow_abort]
111+
Disallow empty commit messages. Useful in CI. [Read more][allow_abort]
121112

122113
### `allowed_prefixes`
123114

124-
Type: `list`
125-
Default: `[ "Merge", "Revert", "Pull request", "fixup!", "squash!"]`
126-
Allow some prefixes and do not try to match the regex when checking the message [Read more][allowed_prefixes]
115+
- Type: `list`
116+
- Default: `["Merge", "Revert", "Pull request", "fixup!", "squash!"]`
127117

128-
### `changelog_file`
118+
Allow some prefixes and do not try to match the regex when checking the message. [Read more][allowed_prefixes]
129119

130-
Type: `str`
120+
### `changelog_file`
131121

132-
Default: `CHANGELOG.md`
122+
- Type: `str`
123+
- Default: `CHANGELOG.md`
133124

134125
Filename of exported changelog
135126

136127
### `changelog_format`
137128

138-
Type: `str`
129+
- Type: `str`
130+
- Default: `None`
139131

140-
Default: None
141-
142-
Format used to parse and generate the changelog, If not specified, guessed from [`changelog_file`](#changelog_file).
132+
Format used to parse and generate the changelog. If not specified, guessed from [`changelog_file`](#changelog_file).
143133

144134
### `changelog_incremental`
145135

146-
Type: `bool`
136+
- Type: `bool`
137+
- Default: `False`
147138

148-
Default: `false`
139+
Update changelog with the missing versions. This is good if you don't want to replace previous versions in the file.
149140

150-
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`
141+
!!! note
142+
When doing `cz bump --changelog` this is automatically set to `True`
151143

152144
### `changelog_start_rev`
153145

154-
Type: `str`
155-
156-
Default: `None`
146+
- Type: `str`
147+
- Default: `None`
157148

158149
Start from a given git rev to generate the changelog
159150

160151
### `changelog_merge_prerelease`
161152

162-
Type: `bool`
163-
164-
Default: `false`
153+
- Type: `bool`
154+
- Default: `False`
165155

166156
Collect all changes of prerelease versions into the next non-prerelease version when creating the changelog.
167157

168158
### `style`
169159

170-
Type: `list`
171-
172-
see above
160+
- Type: `list`
161+
- Default: `[]`
173162

174163
Style for the prompts (It will merge this value with default style.) [See More (Styling your prompts with your favorite colors)][additional-features]
175164

176165
### `customize`
177166

178-
Type: `dict`
179-
180-
Default: `None`
167+
- Type: `dict`
168+
- Default: `None`
181169

182170
**This is only supported when config through `toml`.** Custom rules for committing and bumping. [Read more][customization]
183171

184172
### `use_shortcuts`
185173

186-
Type: `bool`
187-
188-
Default: `false`
174+
- Type: `bool`
175+
- Default: `False`
189176

190177
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]
191178

192179
### `major_version_zero`
193180

194-
Type: `bool`
195-
196-
Default: `false`
181+
- Type: `bool`
182+
- Default: `False`
197183

198-
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`. [Read more][major-version-zero]
184+
If enabled, breaking changes on a `0.x` will remain as a `0.x` version. Otherwise, a breaking change will bump a `0.x` version to `1.0`. [Read more][major-version-zero]
199185

200186
### `prerelease_offset`
201187

202-
Type: `int`
188+
- Type: `int`
189+
- Default: `0`
203190

204-
Default: `0`
205-
206-
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. [Read more][prerelease-offset]
191+
In some circumstances, a prerelease cannot start with `0`-for example, in embedded projects where individual characters are encoded as bytes. You can specify an offset from which to start counting. [Read more][prerelease-offset]
207192

208193
### `pre_bump_hooks`
209194

210-
Type: `list[str]`
211-
212-
Default: `[]`
195+
- Type: `list[str]`
196+
- Default: `[]`
213197

214198
Calls the hook scripts **before** bumping version. [Read more][pre_bump_hooks]
215199

216200
### `post_bump_hooks`
217201

218-
Type: `list[str]`
219-
220-
Default: `[]`
202+
- Type: `list[str]`
203+
- Default: `[]`
221204

222205
Calls the hook scripts **after** bumping the version. [Read more][post_bump_hooks]
223206

224207
### `encoding`
225208

226-
Type: `str`
227-
228-
Default: `utf-8`
209+
- Type: `str`
210+
- Default: `"utf-8"`
229211

230212
Sets the character encoding to be used when parsing commit messages. [Read more][encoding]
231213

232214
### `template`
233215

234-
Type: `str`
235-
236-
Default: `None` (provided by plugin)
216+
- Type: `str`
217+
- Default: `None` (provided by plugin)
237218

238219
Provide custom changelog jinja template path relative to the current working directory. [Read more][template-customization]
239220

240221
### `extras`
241222

242-
Type: `dict[str, Any]`
243-
244-
Default: `{}`
223+
- Type: `dict[str, Any]`
224+
- Default: `{}`
245225

246226
Provide extra variables to the changelog template. [Read more][template-customization]
247227

@@ -255,7 +235,7 @@ You can also create a `.cz.toml` or `cz.toml` file at the root of your project f
255235

256236
Example configuration:
257237

258-
```toml
238+
```toml title=".cz.toml"
259239
[tool.commitizen]
260240
name = "cz_conventional_commits"
261241
version = "0.1.0"
@@ -282,7 +262,7 @@ style = [
282262

283263
Commitizen has support for JSON configuration. Recommended for `NodeJS` projects.
284264

285-
```json
265+
```json title=".cz.json"
286266
{
287267
"commitizen": {
288268
"name": "cz_conventional_commits",
@@ -308,7 +288,7 @@ Commitizen has support for JSON configuration. Recommended for `NodeJS` projects
308288

309289
YAML configuration is supported by Commitizen. Recommended for `Go`, `ansible`, or even `helm` charts projects.
310290

311-
```yaml
291+
```yaml title=".cz.yaml"
312292
commitizen:
313293
name: cz_conventional_commits
314294
version: 0.1.0
@@ -371,7 +351,7 @@ version_provider = "pep621"
371351

372352
You can add your own version provider by extending `VersionProvider` and exposing it on the `commitizen.provider` entrypoint.
373353

374-
Here is a quick example of a `my-provider` provider reading and writing version in a `VERSION` file.
354+
Here is a quick example of a provider reading and writing version in a `VERSION` file.
375355

376356
```python title="my_provider.py"
377357
from pathlib import Path

0 commit comments

Comments
 (0)