commitizen 3.24.0__tar.gz → 3.26.0__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-3.24.0 → commitizen-3.26.0}/PKG-INFO +2 -2
- commitizen-3.26.0/commitizen/__version__.py +1 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cli.py +6 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/commands/commit.py +11 -1
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/conventional_commits/conventional_commits.py +1 -1
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/jira/jira.py +1 -1
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/exceptions.py +6 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/docs/README.md +1 -1
- {commitizen-3.24.0 → commitizen-3.26.0}/pyproject.toml +3 -3
- commitizen-3.24.0/commitizen/__version__.py +0 -1
- {commitizen-3.24.0 → commitizen-3.26.0}/LICENSE +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/__init__.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/__main__.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/bump.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/changelog.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/changelog_formats/__init__.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/changelog_formats/asciidoc.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/changelog_formats/base.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/changelog_formats/markdown.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/changelog_formats/restructuredtext.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/changelog_formats/textile.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cmd.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/commands/__init__.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/commands/bump.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/commands/changelog.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/commands/check.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/commands/example.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/commands/info.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/commands/init.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/commands/list_cz.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/commands/schema.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/commands/version.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/config/__init__.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/config/base_config.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/config/json_config.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/config/toml_config.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/config/yaml_config.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/__init__.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/base.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/conventional_commits/__init__.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/conventional_commits/conventional_commits_info.txt +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/customize/__init__.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/customize/customize.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/customize/customize_info.txt +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/exceptions.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/jira/__init__.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/jira/jira_info.txt +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/cz/utils.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/defaults.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/factory.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/git.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/hooks.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/out.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/providers/__init__.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/providers/base_provider.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/providers/cargo_provider.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/providers/commitizen_provider.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/providers/composer_provider.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/providers/npm_provider.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/providers/pep621_provider.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/providers/poetry_provider.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/providers/scm_provider.py +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/templates/CHANGELOG.adoc.j2 +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/templates/CHANGELOG.md.j2 +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/templates/CHANGELOG.rst.j2 +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/templates/CHANGELOG.textile.j2 +0 -0
- {commitizen-3.24.0 → commitizen-3.26.0}/commitizen/version_schemes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: commitizen
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.26.0
|
|
4
4
|
Summary: Python commitizen client tool
|
|
5
5
|
Home-page: https://github.com/commitizen-tools/commitizen
|
|
6
6
|
License: MIT
|
|
@@ -70,7 +70,7 @@ descriptive commits.
|
|
|
70
70
|
### Features
|
|
71
71
|
|
|
72
72
|
- Command-line utility to create commits with your rules. Defaults: [Conventional commits][conventional_commits]
|
|
73
|
-
- Bump version automatically using [semantic versioning][semver] based on the commits. [Read More](./bump.md)
|
|
73
|
+
- Bump version automatically using [semantic versioning][semver] based on the commits. [Read More](./commands/bump.md)
|
|
74
74
|
- Generate a changelog using [Keep a changelog][keepchangelog]
|
|
75
75
|
- Update your project's version files automatically
|
|
76
76
|
- Display information about your commit rules (commands: schema, example, info)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.26.0"
|
|
@@ -154,6 +154,12 @@ data = {
|
|
|
154
154
|
"action": "store_true",
|
|
155
155
|
"help": "Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.",
|
|
156
156
|
},
|
|
157
|
+
{
|
|
158
|
+
"name": ["-l", "--message-length-limit"],
|
|
159
|
+
"type": int,
|
|
160
|
+
"default": 0,
|
|
161
|
+
"help": "length limit of the commit message; 0 for no limit",
|
|
162
|
+
},
|
|
157
163
|
],
|
|
158
164
|
},
|
|
159
165
|
{
|
|
@@ -12,6 +12,7 @@ from commitizen.cz.exceptions import CzException
|
|
|
12
12
|
from commitizen.cz.utils import get_backup_file_path
|
|
13
13
|
from commitizen.exceptions import (
|
|
14
14
|
CommitError,
|
|
15
|
+
CommitMessageLengthExceededError,
|
|
15
16
|
CustomError,
|
|
16
17
|
DryRunExit,
|
|
17
18
|
NoAnswersError,
|
|
@@ -61,7 +62,16 @@ class Commit:
|
|
|
61
62
|
|
|
62
63
|
if not answers:
|
|
63
64
|
raise NoAnswersError()
|
|
64
|
-
|
|
65
|
+
|
|
66
|
+
message = cz.message(answers)
|
|
67
|
+
message_len = len(message.partition("\n")[0].strip())
|
|
68
|
+
message_length_limit: int = self.arguments.get("message_length_limit", 0)
|
|
69
|
+
if 0 < message_length_limit < message_len:
|
|
70
|
+
raise CommitMessageLengthExceededError(
|
|
71
|
+
f"Length of commit message exceeds limit ({message_len}/{message_length_limit})"
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
return message
|
|
65
75
|
|
|
66
76
|
def __call__(self):
|
|
67
77
|
dry_run: bool = self.arguments.get("dry_run")
|
|
@@ -36,6 +36,7 @@ class ExitCode(enum.IntEnum):
|
|
|
36
36
|
CHANGELOG_FORMAT_UNKNOWN = 29
|
|
37
37
|
CONFIG_FILE_NOT_FOUND = 30
|
|
38
38
|
CONFIG_FILE_IS_EMPTY = 31
|
|
39
|
+
COMMIT_MESSAGE_LENGTH_LIMIT_EXCEEDED = 32
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
class CommitizenException(Exception):
|
|
@@ -201,3 +202,8 @@ class ConfigFileNotFound(CommitizenException):
|
|
|
201
202
|
class ConfigFileIsEmpty(CommitizenException):
|
|
202
203
|
exit_code = ExitCode.CONFIG_FILE_IS_EMPTY
|
|
203
204
|
message = "Config file is empty, please check your file path again."
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
class CommitMessageLengthExceededError(CommitizenException):
|
|
208
|
+
exit_code = ExitCode.COMMIT_MESSAGE_LENGTH_LIMIT_EXCEEDED
|
|
209
|
+
message = "Length of commit message exceeds the given limit."
|
|
@@ -32,7 +32,7 @@ descriptive commits.
|
|
|
32
32
|
### Features
|
|
33
33
|
|
|
34
34
|
- Command-line utility to create commits with your rules. Defaults: [Conventional commits][conventional_commits]
|
|
35
|
-
- Bump version automatically using [semantic versioning][semver] based on the commits. [Read More](./bump.md)
|
|
35
|
+
- Bump version automatically using [semantic versioning][semver] based on the commits. [Read More](./commands/bump.md)
|
|
36
36
|
- Generate a changelog using [Keep a changelog][keepchangelog]
|
|
37
37
|
- Update your project's version files automatically
|
|
38
38
|
- Display information about your commit rules (commands: schema, example, info)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[tool.commitizen]
|
|
2
|
-
version = "3.
|
|
2
|
+
version = "3.26.0"
|
|
3
3
|
tag_format = "v$version"
|
|
4
4
|
version_files = [
|
|
5
5
|
"pyproject.toml:version",
|
|
@@ -9,7 +9,7 @@ version_files = [
|
|
|
9
9
|
|
|
10
10
|
[tool.poetry]
|
|
11
11
|
name = "commitizen"
|
|
12
|
-
version = "3.
|
|
12
|
+
version = "3.26.0"
|
|
13
13
|
description = "Python commitizen client tool"
|
|
14
14
|
authors = ["Santiago Fraire <santiwilly@gmail.com>"]
|
|
15
15
|
license = "MIT"
|
|
@@ -62,7 +62,7 @@ pytest-xdist = "^3.1.0"
|
|
|
62
62
|
# code formatter
|
|
63
63
|
black = ">=23.11,<25.0"
|
|
64
64
|
# linter
|
|
65
|
-
ruff = ">=0.1.6,<0.
|
|
65
|
+
ruff = ">=0.1.6,<0.5.0"
|
|
66
66
|
pre-commit = ">=2.18,<4.0"
|
|
67
67
|
mypy = "^1.4"
|
|
68
68
|
types-PyYAML = ">=5.4.3,<7.0.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "3.24.0"
|
|
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
|
|
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
|