Skip to content

Commit 96492fe

Browse files
committed
docs: add retry_after_failure config and retry options for commit command
1 parent 0f0668b commit 96492fe

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/commit.md

+7
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,10 @@ For example, using the `-S` option on `git commit` to sign a commit is now commi
2929
!!! note
3030
Deprecation warning: A commit can be signed off using `cz commit --signoff` or the shortcut `cz commit -s`.
3131
This syntax is now deprecated in favor of the new `cz commit -- -s` syntax.
32+
33+
### Retry
34+
35+
You can use `cz commit --retry` to reuse the last commit message when the previous commit attempt failed.
36+
To automatically retry when running `cz commit`, you can set the `retry_after_failure`
37+
configuration option to `true`. Running `cz commit --no-retry` makes commitizen ignore `retry_after_failure`, forcing
38+
a new commit message to be prompted.

docs/config.md

+9
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ Default: `None`
8282

8383
Create custom commit message, useful to skip ci. [Read more][bump_message]
8484

85+
### `retry_after_failure`
86+
87+
Type: `bool`
88+
89+
Default: `false`
90+
91+
Automatically retry failed commit when running `cz commit`. [Read more][retry_after_failure]
92+
8593
### `allow_abort`
8694

8795
Type: `bool`
@@ -380,6 +388,7 @@ setup(
380388
[bump_message]: bump.md#bump_message
381389
[major-version-zero]: bump.md#-major-version-zero
382390
[prerelease-offset]: bump.md#-prerelease_offset
391+
[retry_after_failure]: commit.md#retry
383392
[allow_abort]: check.md#allow-abort
384393
[version-scheme]: bump.md#version-scheme
385394
[pre_bump_hooks]: bump.md#pre_bump_hooks

0 commit comments

Comments
 (0)