Skip to content

Commit 34027e8

Browse files
committed
fix(cli): capitalize the first characters of help texts and fix minor grammar errors
1 parent 1d89195 commit 34027e8

File tree

51 files changed

+643
-620
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+643
-620
lines changed

commitizen/cli.py

Lines changed: 98 additions & 105 deletions
Large diffs are not rendered by default.

tests/commands/test_common_command/test_command_shows_description_when_use_help_option_py_3_10_bump_.txt

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,69 +14,71 @@ usage: cz bump [-h] [--dry-run] [--files-only] [--local-version] [--changelog]
1414
[--allow-no-commit]
1515
[MANUAL_VERSION]
1616

17-
bump semantic version based on the git log
17+
Bump semantic version based on the git log
1818

1919
positional arguments:
20-
MANUAL_VERSION bump to the given version (e.g: 1.5.3)
20+
MANUAL_VERSION Bump to the given version (e.g., 1.5.3).
2121

2222
options:
2323
-h, --help show this help message and exit
24-
--dry-run show output to stdout, no commit, no modified files
25-
--files-only bump version in the files from the config
26-
--local-version bump only the local version portion
27-
--changelog, -ch generate the changelog for the newest version
28-
--no-verify this option bypasses the pre-commit and commit-msg
29-
hooks
30-
--yes accept automatically questions done
24+
--dry-run Perform a dry run, without committing or modifying
25+
files.
26+
--files-only Bump version in the `version_files` specified in the
27+
configuration file only.
28+
--local-version Bump version only the local version portion (ignoring
29+
the public version).
30+
--changelog, -ch Generate the changelog for the latest version.
31+
--no-verify Bypass the pre-commit and commit-msg hooks.
32+
--yes Accept automatically answered questions.
3133
--tag-format TAG_FORMAT
32-
the format used to tag the commit and read it, use it
33-
in existing projects, wrap around simple quotes
34+
The format used to tag the commit and read it. Use it
35+
in existing projects, and wrap around simple quotes.
3436
--bump-message BUMP_MESSAGE
35-
template used to create the release commit, useful
36-
when working with CI
37+
Template used to create the release commit, useful
38+
when working with CI.
3739
--prerelease {alpha,beta,rc}, -pr {alpha,beta,rc}
38-
choose type of prerelease
40+
Type of prerelease.
3941
--devrelease DEVRELEASE, -d DEVRELEASE
40-
specify non-negative integer for dev. release
42+
Specify non-negative integer for dev release.
4143
--increment {MAJOR,MINOR,PATCH}
42-
manually specify the desired increment
44+
Specify the desired increment.
4345
--increment-mode {linear,exact}
44-
set the method by which the new version is chosen.
45-
'linear' (default) guesses the next version based on
46-
typical linear version progression, such that bumping
47-
of a pre-release with lower precedence than the
48-
current pre-release phase maintains the current phase
49-
of higher precedence. 'exact' applies the changes that
46+
Set the method by which the new version is chosen.
47+
'linear' (default) resolves the next version based on
48+
typical linear version progression, where bumping of a
49+
pre-release with lower precedence than the current
50+
pre-release phase maintains the current phase of
51+
higher precedence. 'exact' applies the changes that
5052
have been specified (or determined from the commit
51-
log) without interpretation, such that the increment
52-
and pre-release are always honored
53+
log) without interpretation, ensuring the increment
54+
and pre-release are always honored.
5355
--check-consistency, -cc
54-
check consistency among versions defined in commitizen
55-
configuration and version_files
56-
--annotated-tag, -at create annotated tag instead of lightweight one
56+
Check consistency among versions defined in Commitizen
57+
configuration file and `version_files`.
58+
--annotated-tag, -at Create annotated tag instead of lightweight one.
5759
--annotated-tag-message ANNOTATED_TAG_MESSAGE, -atm ANNOTATED_TAG_MESSAGE
58-
create annotated tag message
59-
--gpg-sign, -s sign tag instead of lightweight one
60+
Create annotated tag message.
61+
--gpg-sign, -s Sign tag instead of lightweight one.
6062
--changelog-to-stdout
61-
Output changelog to the stdout
63+
Output changelog to stdout.
6264
--git-output-to-stderr
63-
Redirect git output to stderr
64-
--retry retry commit if it fails the 1st time
65-
--major-version-zero keep major version at zero, even for breaking changes
65+
Redirect git output to stderr.
66+
--retry Retry commit if it fails for the first time.
67+
--major-version-zero Keep major version at zero, even for breaking changes.
6668
--template TEMPLATE, -t TEMPLATE
67-
changelog template file name (relative to the current
68-
working directory)
69+
Changelog template file name (relative to the current
70+
working directory).
6971
--extra EXTRA, -e EXTRA
70-
a changelog extra variable (in the form 'key=value')
72+
Changelog extra variables (in the form 'key=value').
7173
--file-name FILE_NAME
72-
file name of changelog (default: 'CHANGELOG.md')
74+
File name of changelog (default: 'CHANGELOG.md').
7375
--prerelease-offset PRERELEASE_OFFSET
74-
start pre-releases with this offset
76+
Start pre-releases with this offset.
7577
--version-scheme {pep440,semver,semver2}
76-
choose version scheme
78+
Choose version scheme.
7779
--version-type {pep440,semver,semver2}
78-
Deprecated, use --version-scheme instead
80+
Deprecated, use `--version-scheme` instead.
7981
--build-metadata BUILD_METADATA
80-
Add additional build-metadata to the version-number
81-
--get-next Determine the next version and write to stdout
82-
--allow-no-commit bump version without eligible commits
82+
Add additional build-metadata to the version-number.
83+
--get-next Determine the next version and write to stdout.
84+
--allow-no-commit Bump version without eligible commits.

tests/commands/test_common_command/test_command_shows_description_when_use_help_option_py_3_10_changelog_.txt

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,37 @@ usage: cz changelog [-h] [--dry-run] [--file-name FILE_NAME]
66
[--extra EXTRA] [--tag-format TAG_FORMAT]
77
[rev_range]
88

9-
generate changelog (note that it will overwrite existing file)
9+
Generate changelog (note that it will overwrite existing files)
1010

1111
positional arguments:
12-
rev_range generates changelog for the given version (e.g: 1.5.3)
13-
or version range (e.g: 1.5.3..1.7.9)
12+
rev_range Generate changelog for the given version (e.g., 1.5.3)
13+
or version range (e.g., 1.5.3..1.7.9).
1414

1515
options:
1616
-h, --help show this help message and exit
17-
--dry-run show changelog to stdout
17+
--dry-run Show changelog to stdout.
1818
--file-name FILE_NAME
19-
file name of changelog (default: 'CHANGELOG.md')
19+
File name of changelog (default: 'CHANGELOG.md').
2020
--unreleased-version UNRELEASED_VERSION
21-
set the value for the new version (use the tag value),
22-
instead of using unreleased
23-
--incremental generates changelog from last created version, useful
24-
if the changelog has been manually modified
21+
Set the value for the new version (use the tag value),
22+
instead of using unreleased versions.
23+
--incremental Generate changelog from the last created version,
24+
useful if the changelog has been manually modified.
2525
--start-rev START_REV
26-
start rev of the changelog. If not set, it will
27-
generate changelog from the start
28-
--merge-prerelease collect all changes from prereleases into next non-
29-
prerelease. If not set, it will include prereleases in
30-
the changelog
26+
Start rev of the changelog. If not set, it will
27+
generate changelog from the beginning.
28+
--merge-prerelease Collect all changes from prereleases into the next
29+
non-prerelease. If not set, it will include
30+
prereleases in the changelog.
3131
--version-scheme {pep440,semver,semver2}
32-
choose version scheme
32+
Choose version scheme.
3333
--export-template EXPORT_TEMPLATE
3434
Export the changelog template into this file instead
35-
of rendering it
35+
of rendering it.
3636
--template TEMPLATE, -t TEMPLATE
37-
changelog template file name (relative to the current
38-
working directory)
37+
Changelog template file name (relative to the current
38+
working directory).
3939
--extra EXTRA, -e EXTRA
40-
a changelog extra variable (in the form 'key=value')
40+
Changelog extra variables (in the form 'key=value').
4141
--tag-format TAG_FORMAT
42-
The format of the tag, wrap around simple quotes
42+
The format of the tag, wrap around simple quotes.

tests/commands/test_common_command/test_command_shows_description_when_use_help_option_py_3_10_check_.txt

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,27 @@ usage: cz check [-h]
33
[--allow-abort] [--allowed-prefixes [ALLOWED_PREFIXES ...]]
44
[-l MESSAGE_LENGTH_LIMIT]
55

6-
validates that a commit message matches the commitizen schema
6+
Validate that a commit message matches the commitizen schema
77

88
options:
99
-h, --help show this help message and exit
1010
--commit-msg-file COMMIT_MSG_FILE
11-
ask for the name of the temporal file that contains
12-
the commit message. Using it in a git hook script:
13-
MSG_FILE=$1
11+
Ask for the name of the temporary file that contains
12+
the commit message. Use it in a git hook script:
13+
MSG_FILE=$1.
1414
--rev-range REV_RANGE
15-
a range of git rev to check. e.g, master..HEAD
15+
Validate the commits in the given range of git rev,
16+
e.g., master..HEAD.
1617
-d, --use-default-range
17-
check from the default branch to HEAD. e.g,
18-
refs/remotes/origin/master..HEAD
18+
Validate the commits from the default branch to HEAD,
19+
e.g., refs/remotes/origin/master..HEAD.
1920
-m MESSAGE, --message MESSAGE
20-
commit message that needs to be checked
21-
--allow-abort allow empty commit messages, which typically abort a
22-
commit
21+
Validate the given commit message.
22+
--allow-abort Allow empty commit messages, which typically abort a
23+
commit.
2324
--allowed-prefixes [ALLOWED_PREFIXES ...]
24-
allowed commit message prefixes. If the message starts
25-
by one of these prefixes, the message won't be checked
26-
against the regex
25+
Skip validation for commit messages that start with
26+
the specified prefixes.
2727
-l MESSAGE_LENGTH_LIMIT, --message-length-limit MESSAGE_LENGTH_LIMIT
28-
length limit of the commit message; 0 for no limit
28+
Restrict the length of the **first line** of the
29+
commit message; 0 for no limit.

tests/commands/test_common_command/test_command_shows_description_when_use_help_option_py_3_10_commit_.txt

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,24 @@ usage: cz commit [-h] [--retry] [--no-retry] [--dry-run]
22
[--write-message-to-file FILE_PATH] [-s] [-a] [-e]
33
[-l MESSAGE_LENGTH_LIMIT] [--]
44

5-
create new commit
5+
Create new commit
66

77
options:
88
-h, --help show this help message and exit
9-
--retry retry last commit
10-
--no-retry skip retry if retry_after_failure is set to true
11-
--dry-run show output to stdout, no commit, no modified files
9+
--retry Retry the last commit.
10+
--no-retry Skip retry if --retry or `retry_after_failure` is set
11+
to true.
12+
--dry-run Perform a dry run, without committing or modifying
13+
files.
1214
--write-message-to-file FILE_PATH
13-
write message to file before committing (can be
14-
combined with --dry-run)
15-
-s, --signoff Deprecated, use 'cz commit -- -s' instead
16-
-a, --all Tell the command to automatically stage files that
17-
have been modified and deleted, but new files you have
18-
not told Git about are not affected.
19-
-e, --edit edit the commit message before committing
15+
Write message to FILE_PATH before committing (can be
16+
used with --dry-run).
17+
-s, --signoff Deprecated, use `cz commit -- -s` instead.
18+
-a, --all Automatically stage files that have been modified and
19+
deleted, but new files you have not told Git about are
20+
not affected.
21+
-e, --edit Edit the commit message before committing.
2022
-l MESSAGE_LENGTH_LIMIT, --message-length-limit MESSAGE_LENGTH_LIMIT
21-
length limit of the commit message; 0 for no limit
22-
-- Positional arguments separator (recommended)
23+
Set the length limit of the commit message; 0 for no
24+
limit.
25+
-- Positional arguments separator (recommended).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
usage: cz example [-h]
22

3-
show commit example
3+
Show commit example
44

55
options:
66
-h, --help show this help message and exit
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
usage: cz info [-h]
22

3-
show information about the cz
3+
Show information about the cz
44

55
options:
66
-h, --help show this help message and exit
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
usage: cz init [-h]
22

3-
init commitizen configuration
3+
Initialize commitizen configuration
44

55
options:
66
-h, --help show this help message and exit
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
usage: cz ls [-h]
22

3-
show available commitizens
3+
Show available Commitizens
44

55
options:
66
-h, --help show this help message and exit
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
usage: cz schema [-h]
22

3-
show commit schema
3+
Show commit schema
44

55
options:
66
-h, --help show this help message and exit

0 commit comments

Comments
 (0)