commitizen 4.8.0__tar.gz → 4.8.2__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.8.0 → commitizen-4.8.2}/PKG-INFO +1 -1
- commitizen-4.8.2/commitizen/__version__.py +1 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/commands/check.py +14 -21
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/customize/customize.py +15 -39
- {commitizen-4.8.0 → commitizen-4.8.2}/pyproject.toml +2 -2
- commitizen-4.8.0/commitizen/__version__.py +0 -1
- {commitizen-4.8.0 → commitizen-4.8.2}/LICENSE +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/__init__.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/__main__.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/bump.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/changelog.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/changelog_formats/__init__.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/changelog_formats/asciidoc.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/changelog_formats/base.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/changelog_formats/markdown.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/changelog_formats/restructuredtext.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/changelog_formats/textile.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cli.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cmd.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/commands/__init__.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/commands/bump.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/commands/changelog.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/commands/commit.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/commands/example.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/commands/info.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/commands/init.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/commands/list_cz.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/commands/schema.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/commands/version.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/config/__init__.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/config/base_config.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/config/json_config.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/config/toml_config.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/config/yaml_config.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/__init__.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/base.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/conventional_commits/__init__.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/conventional_commits/conventional_commits.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/conventional_commits/conventional_commits_info.txt +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/customize/__init__.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/customize/customize_info.txt +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/exceptions.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/jira/__init__.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/jira/jira.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/jira/jira_info.txt +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/cz/utils.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/defaults.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/exceptions.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/factory.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/git.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/hooks.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/out.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/providers/__init__.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/providers/base_provider.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/providers/cargo_provider.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/providers/commitizen_provider.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/providers/composer_provider.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/providers/npm_provider.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/providers/pep621_provider.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/providers/poetry_provider.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/providers/scm_provider.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/providers/uv_provider.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/py.typed +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/tags.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/templates/CHANGELOG.adoc.j2 +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/templates/CHANGELOG.md.j2 +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/templates/CHANGELOG.rst.j2 +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/templates/CHANGELOG.textile.j2 +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/commitizen/version_schemes.py +0 -0
- {commitizen-4.8.0 → commitizen-4.8.2}/docs/README.md +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "4.8.2"
|
|
@@ -72,15 +72,11 @@ class Check:
|
|
|
72
72
|
raise NoCommitsFoundError(f"No commit found with range: '{self.rev_range}'")
|
|
73
73
|
|
|
74
74
|
pattern = self.cz.schema_pattern()
|
|
75
|
-
ill_formatted_commits = [
|
|
76
|
-
commit
|
|
77
|
-
for commit in commits
|
|
78
|
-
if not self.validate_commit_message(commit.message, pattern)
|
|
79
|
-
]
|
|
80
75
|
displayed_msgs_content = "\n".join(
|
|
81
76
|
[
|
|
82
77
|
f'commit "{commit.rev}": "{commit.message}"'
|
|
83
|
-
for commit in
|
|
78
|
+
for commit in commits
|
|
79
|
+
if not self.validate_commit_message(commit.message, pattern)
|
|
84
80
|
]
|
|
85
81
|
)
|
|
86
82
|
if displayed_msgs_content:
|
|
@@ -92,24 +88,21 @@ class Check:
|
|
|
92
88
|
)
|
|
93
89
|
out.success("Commit validation: successful!")
|
|
94
90
|
|
|
91
|
+
def _get_commit_message(self) -> str | None:
|
|
92
|
+
if self.commit_msg_file is None:
|
|
93
|
+
# Get commit message from command line (--message)
|
|
94
|
+
return self.commit_msg
|
|
95
|
+
|
|
96
|
+
with open(self.commit_msg_file, encoding=self.encoding) as commit_file:
|
|
97
|
+
# Get commit message from file (--commit-msg-file)
|
|
98
|
+
return commit_file.read()
|
|
99
|
+
|
|
95
100
|
def _get_commits(self):
|
|
96
|
-
msg
|
|
97
|
-
|
|
98
|
-
if self.commit_msg_file is not None:
|
|
99
|
-
# Enter this branch if commit_msg_file is "".
|
|
100
|
-
with open(self.commit_msg_file, encoding=self.encoding) as commit_file:
|
|
101
|
-
msg = commit_file.read()
|
|
102
|
-
# Get commit message from command line (--message)
|
|
103
|
-
elif self.commit_msg is not None:
|
|
104
|
-
msg = self.commit_msg
|
|
105
|
-
if msg is not None:
|
|
106
|
-
msg = self._filter_comments(msg)
|
|
107
|
-
return [git.GitCommit(rev="", title="", body=msg)]
|
|
101
|
+
if (msg := self._get_commit_message()) is not None:
|
|
102
|
+
return [git.GitCommit(rev="", title="", body=self._filter_comments(msg))]
|
|
108
103
|
|
|
109
104
|
# Get commit messages from git log (--rev-range)
|
|
110
|
-
|
|
111
|
-
return git.get_commits(end=self.rev_range)
|
|
112
|
-
return git.get_commits()
|
|
105
|
+
return git.get_commits(end=self.rev_range or "HEAD")
|
|
113
106
|
|
|
114
107
|
@staticmethod
|
|
115
108
|
def _filter_comments(msg: str) -> str:
|
|
@@ -33,35 +33,17 @@ class CustomizeCommitsCz(BaseCommitizen):
|
|
|
33
33
|
raise MissingCzCustomizeConfigError()
|
|
34
34
|
self.custom_settings = self.config.settings["customize"]
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if custom_bump_map_major_version_zero:
|
|
48
|
-
self.bump_map_major_version_zero = custom_bump_map_major_version_zero
|
|
49
|
-
|
|
50
|
-
custom_change_type_order = self.custom_settings.get("change_type_order")
|
|
51
|
-
if custom_change_type_order:
|
|
52
|
-
self.change_type_order = custom_change_type_order
|
|
53
|
-
|
|
54
|
-
commit_parser = self.custom_settings.get("commit_parser")
|
|
55
|
-
if commit_parser:
|
|
56
|
-
self.commit_parser = commit_parser
|
|
57
|
-
|
|
58
|
-
changelog_pattern = self.custom_settings.get("changelog_pattern")
|
|
59
|
-
if changelog_pattern:
|
|
60
|
-
self.changelog_pattern = changelog_pattern
|
|
61
|
-
|
|
62
|
-
change_type_map = self.custom_settings.get("change_type_map")
|
|
63
|
-
if change_type_map:
|
|
64
|
-
self.change_type_map = change_type_map
|
|
36
|
+
for attr_name in [
|
|
37
|
+
"bump_pattern",
|
|
38
|
+
"bump_map",
|
|
39
|
+
"bump_map_major_version_zero",
|
|
40
|
+
"change_type_order",
|
|
41
|
+
"commit_parser",
|
|
42
|
+
"changelog_pattern",
|
|
43
|
+
"change_type_map",
|
|
44
|
+
]:
|
|
45
|
+
if value := self.custom_settings.get(attr_name):
|
|
46
|
+
setattr(self, attr_name, value)
|
|
65
47
|
|
|
66
48
|
def questions(self) -> Questions:
|
|
67
49
|
return self.custom_settings.get("questions", [{}])
|
|
@@ -70,8 +52,7 @@ class CustomizeCommitsCz(BaseCommitizen):
|
|
|
70
52
|
message_template = Template(self.custom_settings.get("message_template", ""))
|
|
71
53
|
if getattr(Template, "substitute", None):
|
|
72
54
|
return message_template.substitute(**answers) # type: ignore
|
|
73
|
-
|
|
74
|
-
return message_template.render(**answers)
|
|
55
|
+
return message_template.render(**answers)
|
|
75
56
|
|
|
76
57
|
def example(self) -> str:
|
|
77
58
|
return self.custom_settings.get("example") or ""
|
|
@@ -83,12 +64,7 @@ class CustomizeCommitsCz(BaseCommitizen):
|
|
|
83
64
|
return self.custom_settings.get("schema") or ""
|
|
84
65
|
|
|
85
66
|
def info(self) -> str:
|
|
86
|
-
info_path
|
|
87
|
-
info = self.custom_settings.get("info")
|
|
88
|
-
if info_path:
|
|
67
|
+
if info_path := self.custom_settings.get("info_path"):
|
|
89
68
|
with open(info_path, encoding=self.config.settings["encoding"]) as f:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
elif info:
|
|
93
|
-
return info
|
|
94
|
-
return ""
|
|
69
|
+
return f.read()
|
|
70
|
+
return self.custom_settings.get("info") or ""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "commitizen"
|
|
3
|
-
version = "4.8.
|
|
3
|
+
version = "4.8.2"
|
|
4
4
|
description = "Python commitizen client tool"
|
|
5
5
|
authors = [{ name = "Santiago Fraire", email = "santiwilly@gmail.com" }]
|
|
6
6
|
maintainers = [
|
|
@@ -88,7 +88,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
[tool.commitizen]
|
|
91
|
-
version = "4.8.
|
|
91
|
+
version = "4.8.2"
|
|
92
92
|
tag_format = "v$version"
|
|
93
93
|
version_files = [
|
|
94
94
|
"pyproject.toml:version",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "4.8.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
|
{commitizen-4.8.0 → commitizen-4.8.2}/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
|