From ed636badc849c4893a00a8eb2b108081c1536372 Mon Sep 17 00:00:00 2001 From: bhelgs <33836927+bhelgs@users.noreply.github.com> Date: Tue, 2 Aug 2022 00:50:48 -0400 Subject: [PATCH] refactor(changelog): removes unused code. duplicates are found in changelog_parser --- commitizen/changelog.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/commitizen/changelog.py b/commitizen/changelog.py index 5e43e2fef9..1ccdb4e297 100644 --- a/commitizen/changelog.py +++ b/commitizen/changelog.py @@ -38,29 +38,6 @@ from commitizen.exceptions import InvalidConfigurationError from commitizen.git import GitCommit, GitTag -CATEGORIES = [ - ("fix", "fix"), - ("breaking", "BREAKING CHANGES"), - ("feat", "feat"), - ("refactor", "refactor"), - ("perf", "perf"), - ("test", "test"), - ("build", "build"), - ("ci", "ci"), - ("chore", "chore"), -] - - -def transform_change_type(change_type: str) -> str: - # TODO: Use again to parse, for this we have to wait until the maps get - # defined again. - _change_type_lower = change_type.lower() - for match_value, output in CATEGORIES: - if re.search(match_value, _change_type_lower): - return output - else: - raise ValueError(f"Could not match a change_type with {change_type}") - def get_commit_tag(commit: GitCommit, tags: List[GitTag]) -> Optional[GitTag]: return next((tag for tag in tags if tag.rev == commit.rev), None)