commitizen 4.17.1__tar.gz → 4.18.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {commitizen-4.17.1 → commitizen-4.18.1}/PKG-INFO +6 -1
- commitizen-4.18.1/commitizen/__version__.py +1 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cli.py +5 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/commands/commit.py +29 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/defaults.py +2 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/docs/README.md +5 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/pyproject.toml +3 -1
- {commitizen-4.17.1 → commitizen-4.18.1}/pyproject.toml.orig +3 -1
- commitizen-4.17.1/commitizen/__version__.py +0 -1
- {commitizen-4.17.1 → commitizen-4.18.1}/LICENSE +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/__init__.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/__main__.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/bump.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/changelog.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/changelog_formats/__init__.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/changelog_formats/asciidoc.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/changelog_formats/base.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/changelog_formats/markdown.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/changelog_formats/restructuredtext.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/changelog_formats/textile.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cmd.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/commands/__init__.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/commands/bump.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/commands/changelog.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/commands/check.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/commands/example.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/commands/info.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/commands/init.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/commands/list_cz.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/commands/schema.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/commands/version.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/config/__init__.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/config/base_config.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/config/factory.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/config/json_config.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/config/toml_config.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/config/yaml_config.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/__init__.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/base.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/conventional_commits/__init__.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/conventional_commits/conventional_commits.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/conventional_commits/conventional_commits_info.txt +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/customize/__init__.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/customize/customize.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/customize/customize_info.txt +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/exceptions.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/jira/__init__.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/jira/jira.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/jira/jira_info.txt +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/utils.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/exceptions.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/factory.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/git.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/hooks.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/out.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/project_info.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/providers/__init__.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/providers/base_provider.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/providers/cargo_provider.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/providers/commitizen_provider.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/providers/composer_provider.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/providers/npm_provider.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/providers/pep621_provider.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/providers/poetry_provider.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/providers/scm_provider.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/providers/uv_provider.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/py.typed +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/question.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/tags.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/templates/CHANGELOG.adoc.j2 +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/templates/CHANGELOG.md.j2 +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/templates/CHANGELOG.rst.j2 +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/templates/CHANGELOG.textile.j2 +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/version_increment.py +0 -0
- {commitizen-4.17.1 → commitizen-4.18.1}/commitizen/version_schemes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: commitizen
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.18.1
|
|
4
4
|
Summary: Python commitizen client tool
|
|
5
5
|
Keywords: commitizen,conventional,commits,git
|
|
6
6
|
Author: Santiago Fraire
|
|
@@ -349,6 +349,11 @@ After installation, you can verify the completion is working by:
|
|
|
349
349
|
|
|
350
350
|
For more detailed information about argcomplete configuration and troubleshooting, visit the [argcomplete documentation](https://kislyuk.github.io/argcomplete/).
|
|
351
351
|
|
|
352
|
+
## Star History
|
|
353
|
+
|
|
354
|
+
[](https://star-history.dera.page/#commitizen-tools/commitizen)
|
|
355
|
+
|
|
356
|
+
|
|
352
357
|
## Sponsors
|
|
353
358
|
|
|
354
359
|
These are our cool sponsors!
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "4.18.1"
|
|
@@ -165,6 +165,11 @@ data = {
|
|
|
165
165
|
"type": int,
|
|
166
166
|
"help": "Set the length limit of the commit message; 0 for no limit.",
|
|
167
167
|
},
|
|
168
|
+
{
|
|
169
|
+
"name": ["--body-length-limit"],
|
|
170
|
+
"type": int,
|
|
171
|
+
"help": "Set the length limit of the commit body. Commit message in body will be rewrapped to this length; 0 for no limit.",
|
|
172
|
+
},
|
|
168
173
|
{
|
|
169
174
|
"name": ["--"],
|
|
170
175
|
"action": "store_true",
|
|
@@ -5,6 +5,8 @@ import os
|
|
|
5
5
|
import shutil
|
|
6
6
|
import subprocess
|
|
7
7
|
import tempfile
|
|
8
|
+
import textwrap
|
|
9
|
+
from itertools import chain
|
|
8
10
|
from pathlib import Path
|
|
9
11
|
from typing import TYPE_CHECKING, TypedDict
|
|
10
12
|
|
|
@@ -36,6 +38,7 @@ class CommitArgs(TypedDict, total=False):
|
|
|
36
38
|
edit: bool
|
|
37
39
|
extra_cli_args: list[str]
|
|
38
40
|
message_length_limit: int
|
|
41
|
+
body_length_limit: int
|
|
39
42
|
no_retry: bool
|
|
40
43
|
signoff: bool
|
|
41
44
|
write_message_to_file: Path | None
|
|
@@ -82,6 +85,7 @@ class Commit:
|
|
|
82
85
|
|
|
83
86
|
message = self.cz.message(answers)
|
|
84
87
|
self._validate_subject_length(message)
|
|
88
|
+
message = self._wrap_body(message)
|
|
85
89
|
return message
|
|
86
90
|
|
|
87
91
|
def _validate_subject_length(self, message: str) -> None:
|
|
@@ -100,6 +104,31 @@ class Commit:
|
|
|
100
104
|
f"Length of commit message exceeds limit ({len(subject)}/{message_length_limit}), subject: '{subject}'"
|
|
101
105
|
)
|
|
102
106
|
|
|
107
|
+
def _wrap_body(self, message: str) -> str:
|
|
108
|
+
"""
|
|
109
|
+
Wrap the body of the commit message to the --body-length-limit length.
|
|
110
|
+
"""
|
|
111
|
+
|
|
112
|
+
body_length_limit = self.arguments.get(
|
|
113
|
+
"body_length_limit", self.config.settings["body_length_limit"]
|
|
114
|
+
)
|
|
115
|
+
# By the contract, body_length_limit is set to 0 for no limit
|
|
116
|
+
if not body_length_limit or body_length_limit <= 0:
|
|
117
|
+
return message
|
|
118
|
+
|
|
119
|
+
lines = message.split("\n")
|
|
120
|
+
if len(lines) < 3:
|
|
121
|
+
return message
|
|
122
|
+
|
|
123
|
+
# Preserve intentional blank (or whitespace-only) lines while wrapping
|
|
124
|
+
# non-empty body lines. textwrap.wrap() returns [] for such lines, so
|
|
125
|
+
# they must be special-cased to avoid being silently dropped.
|
|
126
|
+
wrapped_body_lines = chain.from_iterable(
|
|
127
|
+
textwrap.wrap(line, width=body_length_limit) if line.strip() else [line]
|
|
128
|
+
for line in lines[2:]
|
|
129
|
+
)
|
|
130
|
+
return "\n".join(chain(lines[:2], wrapped_body_lines))
|
|
131
|
+
|
|
103
132
|
def manual_edit(self, message: str) -> str:
|
|
104
133
|
editor = git.get_core_editor()
|
|
105
134
|
if editor is None:
|
|
@@ -49,6 +49,7 @@ class Settings(TypedDict, total=False):
|
|
|
49
49
|
legacy_tag_formats: Sequence[str]
|
|
50
50
|
major_version_zero: bool
|
|
51
51
|
message_length_limit: int
|
|
52
|
+
body_length_limit: int
|
|
52
53
|
name: str
|
|
53
54
|
post_bump_hooks: list[str] | None
|
|
54
55
|
pre_bump_hooks: list[str] | None
|
|
@@ -115,6 +116,7 @@ DEFAULT_SETTINGS: Settings = {
|
|
|
115
116
|
"extras": {},
|
|
116
117
|
"breaking_change_exclamation_in_title": False,
|
|
117
118
|
"message_length_limit": 0, # 0 for no limit
|
|
119
|
+
"body_length_limit": 0, # 0 for no limit
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
MAJOR = "MAJOR"
|
|
@@ -303,6 +303,11 @@ After installation, you can verify the completion is working by:
|
|
|
303
303
|
|
|
304
304
|
For more detailed information about argcomplete configuration and troubleshooting, visit the [argcomplete documentation](https://kislyuk.github.io/argcomplete/).
|
|
305
305
|
|
|
306
|
+
## Star History
|
|
307
|
+
|
|
308
|
+
[](https://star-history.dera.page/#commitizen-tools/commitizen)
|
|
309
|
+
|
|
310
|
+
|
|
306
311
|
## Sponsors
|
|
307
312
|
|
|
308
313
|
These are our cool sponsors!
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "commitizen"
|
|
3
|
-
version = "4.
|
|
3
|
+
version = "4.18.1"
|
|
4
4
|
description = "Python commitizen client tool"
|
|
5
5
|
license = "MIT"
|
|
6
6
|
license-files = ["LICENSE"]
|
|
@@ -152,6 +152,8 @@ version_files = [
|
|
|
152
152
|
version_provider = "uv"
|
|
153
153
|
version_scheme = "pep440"
|
|
154
154
|
annotated_tag = true
|
|
155
|
+
update_changelog_on_bump = true
|
|
156
|
+
changelog_incremental = true
|
|
155
157
|
|
|
156
158
|
[tool.uv.build-backend]
|
|
157
159
|
module-name = "commitizen"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "commitizen"
|
|
3
|
-
version = "4.
|
|
3
|
+
version = "4.18.1"
|
|
4
4
|
description = "Python commitizen client tool"
|
|
5
5
|
authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }]
|
|
6
6
|
maintainers = [
|
|
@@ -146,6 +146,8 @@ version_files = [
|
|
|
146
146
|
version_provider = "uv"
|
|
147
147
|
version_scheme = "pep440"
|
|
148
148
|
annotated_tag = true
|
|
149
|
+
update_changelog_on_bump = true
|
|
150
|
+
changelog_incremental = true
|
|
149
151
|
|
|
150
152
|
[tool.uv.build-backend]
|
|
151
153
|
module-name = "commitizen"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "4.17.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{commitizen-4.17.1 → commitizen-4.18.1}/commitizen/cz/conventional_commits/conventional_commits.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|