commitizen 4.13.3__py3-none-any.whl → 4.13.4__py3-none-any.whl
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/__version__.py +1 -1
- commitizen/commands/init.py +11 -4
- {commitizen-4.13.3.dist-info → commitizen-4.13.4.dist-info}/METADATA +1 -1
- {commitizen-4.13.3.dist-info → commitizen-4.13.4.dist-info}/RECORD +6 -6
- {commitizen-4.13.3.dist-info → commitizen-4.13.4.dist-info}/WHEEL +0 -0
- {commitizen-4.13.3.dist-info → commitizen-4.13.4.dist-info}/entry_points.txt +0 -0
commitizen/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "4.13.
|
|
1
|
+
__version__ = "4.13.4"
|
commitizen/commands/init.py
CHANGED
|
@@ -171,24 +171,31 @@ class Init:
|
|
|
171
171
|
def _ask_name(self) -> str:
|
|
172
172
|
name: str = questionary.select(
|
|
173
173
|
f"Please choose a cz (commit rule): (default: {DEFAULT_SETTINGS['name']})",
|
|
174
|
-
choices=self.
|
|
174
|
+
choices=self._construct_name_choices_from_registry(),
|
|
175
175
|
default=DEFAULT_SETTINGS["name"],
|
|
176
176
|
style=self.cz.style,
|
|
177
177
|
).unsafe_ask()
|
|
178
178
|
return name
|
|
179
179
|
|
|
180
|
-
def
|
|
180
|
+
def _construct_name_choices_from_registry(self) -> list[questionary.Choice]:
|
|
181
|
+
"""
|
|
182
|
+
Construct questionary choices of cz names from registry.
|
|
183
|
+
"""
|
|
181
184
|
choices = []
|
|
182
185
|
for cz_name, cz_class in registry.items():
|
|
183
186
|
try:
|
|
184
187
|
cz_obj = cz_class(self.config)
|
|
185
188
|
except MissingCzCustomizeConfigError:
|
|
189
|
+
# Fallback if description is not available
|
|
186
190
|
choices.append(questionary.Choice(title=cz_name, value=cz_name))
|
|
187
191
|
continue
|
|
188
|
-
|
|
192
|
+
|
|
193
|
+
# Get the first line of the schema as the description
|
|
194
|
+
# TODO(bearomorphism): schema is a workaround. Add a description method to the cz class.
|
|
195
|
+
description = cz_obj.schema().partition("\n")[0]
|
|
189
196
|
choices.append(
|
|
190
197
|
questionary.Choice(
|
|
191
|
-
title=cz_name, value=cz_name, description=
|
|
198
|
+
title=cz_name, value=cz_name, description=description
|
|
192
199
|
)
|
|
193
200
|
)
|
|
194
201
|
return choices
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
commitizen/__init__.py,sha256=oOBG9f3DtTPmFnqXnwvuh1XIw9kqf_-cyrFYlRaZ1fQ,593
|
|
2
2
|
commitizen/__main__.py,sha256=ythPim4R6rgC0zU9siklq1oSbkk2HlbiNpwwoegk8uE,71
|
|
3
|
-
commitizen/__version__.py,sha256=
|
|
3
|
+
commitizen/__version__.py,sha256=iU5LgSWF_ERjsjBOXhJAoUXc8emmWGkjYnZRKdMej1c,23
|
|
4
4
|
commitizen/bump.py,sha256=-C09y5sAlVPyWTbEgqZimQMlz6LL248Ht2Pv90Ks6Dg,4692
|
|
5
5
|
commitizen/changelog.py,sha256=ydaFUSHUBPpdNjw_yoPJ1_pr3AAr9rHS-NwP8gQDIUA,11278
|
|
6
6
|
commitizen/changelog_formats/__init__.py,sha256=ZkxdmGybxWTzQZbt5KTJdAdbdKx0-v3aXtNDC-efRQk,3369
|
|
@@ -18,7 +18,7 @@ commitizen/commands/check.py,sha256=F5ufrRrUecr6U-vsYyfaWkHtsFb7L3nd0-oN5c5GT1M,
|
|
|
18
18
|
commitizen/commands/commit.py,sha256=2HaUnpVe0U6sJK_oTb56ilfRRC-a7f29sqCxchBG0E0,6474
|
|
19
19
|
commitizen/commands/example.py,sha256=-pWBjDA2I-dtAHickbkeis08xnFSuBxM2YLBm_Hm0sY,389
|
|
20
20
|
commitizen/commands/info.py,sha256=P009ymylWiwr02p-swky7v1QXZTeOf2wT7jdHkZXAgg,375
|
|
21
|
-
commitizen/commands/init.py,sha256=
|
|
21
|
+
commitizen/commands/init.py,sha256=kAvxLeUcP90hhXAIm5Gf4L6Zorm761RsfHpEB4gbdgM,12643
|
|
22
22
|
commitizen/commands/list_cz.py,sha256=0eCGpRLn5v7XLNWiMkA14QN260fyR6gzoDvAM2mq-IM,349
|
|
23
23
|
commitizen/commands/schema.py,sha256=66m_xCjAsUS7_a2Q_dx-CCiHJ6UXG8RJVUeLO_pl2gU,366
|
|
24
24
|
commitizen/commands/version.py,sha256=X_Hrjb_48hBGTN3J8dD3_kveLvaPBlnQarw96Koag20,2868
|
|
@@ -66,7 +66,7 @@ commitizen/templates/CHANGELOG.md.j2,sha256=MggRrhbL3EabwsH8v0oFMM8G296ATBzePaqu
|
|
|
66
66
|
commitizen/templates/CHANGELOG.rst.j2,sha256=XHh4a7S83Z5Vrd_0UaLDA1Bb7A82Px4eHcbHsZGKYF8,515
|
|
67
67
|
commitizen/templates/CHANGELOG.textile.j2,sha256=8JxCcDdgQUmNPxXFEv5IpbP_vcfvYCo5CSicNCZmFCY,404
|
|
68
68
|
commitizen/version_schemes.py,sha256=93Rqv0mmnuJ-c3UDhHhM-GElVzWcXdtHUbRy9xcbgdc,13213
|
|
69
|
-
commitizen-4.13.
|
|
70
|
-
commitizen-4.13.
|
|
71
|
-
commitizen-4.13.
|
|
72
|
-
commitizen-4.13.
|
|
69
|
+
commitizen-4.13.4.dist-info/WHEEL,sha256=5DEXXimM34_d4Gx1AuF9ysMr1_maoEtGKjaILM3s4w4,80
|
|
70
|
+
commitizen-4.13.4.dist-info/entry_points.txt,sha256=EpbOUAABRQCFhf2HFcmrJZLGsbB_MSJ-tFua-NxUCxE,1085
|
|
71
|
+
commitizen-4.13.4.dist-info/METADATA,sha256=2HQ_BMUkioB1nORV5JHibuWdypXlw1kh4yzhpDrljmM,13532
|
|
72
|
+
commitizen-4.13.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|