feat(ConventionalCommitsCZ): add support for customizable change type choices and bump map overrides by rockleona · Pull Request #2006 · commitizen-tools/commitizen · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 112 additions & 60 deletions commitizen/cz/conventional_commits/conventional_commits.py
12 changes: 11 additions & 1 deletion commitizen/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
if TYPE_CHECKING:
import pathlib

from commitizen.question import CzQuestion
from commitizen.question import Choice, CzQuestion


class CzSettings(TypedDict, total=False):
Expand All @@ -29,6 +29,14 @@ class CzSettings(TypedDict, total=False):
change_type_map: dict[str, str] | None


class CzOverrideSettings(CzSettings, total=False):
change_type_choices: list[Choice]


class CzExtendSettings(CzSettings, total=False):
change_type_choices: list[Choice]


class Settings(TypedDict, total=False):
allow_abort: bool
allowed_prefixes: list[str]
Expand All @@ -43,13 +51,15 @@ class Settings(TypedDict, total=False):
changelog_start_rev: str | None
customize: CzSettings
encoding: str
extend: CzExtendSettings
extras: dict[str, Any]
gpg_sign: bool
ignored_tag_formats: Sequence[str]
legacy_tag_formats: Sequence[str]
major_version_zero: bool
message_length_limit: int
name: str
override: CzOverrideSettings
post_bump_hooks: list[str] | None
pre_bump_hooks: list[str] | None
prerelease_offset: int
Expand Down
92 changes: 92 additions & 0 deletions tests/test_cz_conventional_commits.py
Loading