Skip to content

Commit d36abf5

Browse files
authored
Merge pull request #541 from bhelgs/changelog_code_coverage_improvements
refactor(changelog): removes unused code
2 parents 362ec36 + ed636ba commit d36abf5

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

commitizen/changelog.py

-23
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,6 @@
3838
from commitizen.exceptions import InvalidConfigurationError
3939
from commitizen.git import GitCommit, GitTag
4040

41-
CATEGORIES = [
42-
("fix", "fix"),
43-
("breaking", "BREAKING CHANGES"),
44-
("feat", "feat"),
45-
("refactor", "refactor"),
46-
("perf", "perf"),
47-
("test", "test"),
48-
("build", "build"),
49-
("ci", "ci"),
50-
("chore", "chore"),
51-
]
52-
53-
54-
def transform_change_type(change_type: str) -> str:
55-
# TODO: Use again to parse, for this we have to wait until the maps get
56-
# defined again.
57-
_change_type_lower = change_type.lower()
58-
for match_value, output in CATEGORIES:
59-
if re.search(match_value, _change_type_lower):
60-
return output
61-
else:
62-
raise ValueError(f"Could not match a change_type with {change_type}")
63-
6441

6542
def get_commit_tag(commit: GitCommit, tags: List[GitTag]) -> Optional[GitTag]:
6643
return next((tag for tag in tags if tag.rev == commit.rev), None)

0 commit comments

Comments
 (0)