Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8bfc98d

Browse files
committed
fix(changelog): breaking change on additional types for conventional commits
1 parent 87a5c98 commit 8bfc98d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎commitizen/defaults.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,5 @@ class Settings(TypedDict, total=False):
112112
change_type_order = ["BREAKING CHANGE", "Feat", "Fix", "Refactor", "Perf"]
113113
bump_message = "bump: version $current_version → $new_version"
114114

115-
commit_parser = r"^(?P<change_type>feat|fix|refactor|perf|BREAKING CHANGE)(?:\((?P<scope>[^()\r\n]*)\)|\()?(?P<breaking>!)?:\s(?P<message>.*)?" # noqa
115+
commit_parser = r"^((?P<change_type>feat|fix|refactor|perf|BREAKING CHANGE)(?:\((?P<scope>[^()\r\n]*)\)|\()?(?P<breaking>!)?|\w+!):\s(?P<message>.*)?" # noqa
116116
version_parser = r"(?P<version>([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?(\w+)?)"

‎tests/commands/test_changelog_command.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,9 @@ def test_breaking_change_content_v1_multiline(
516516

517517

518518
@pytest.mark.usefixtures("tmp_commitizen_project")
519-
def test_breaking_change_content_v1_with_exclamation_mark(mocker: MockFixture, capsys, file_regression):
519+
def test_breaking_change_content_v1_with_exclamation_mark(
520+
mocker: MockFixture, capsys, file_regression
521+
):
520522
commit_message = "chore!: drop support for py36"
521523
create_file_and_commit(commit_message)
522524
testargs = ["cz", "changelog", "--dry-run"]
@@ -527,6 +529,7 @@ def test_breaking_change_content_v1_with_exclamation_mark(mocker: MockFixture, c
527529

528530
file_regression.check(out, extension=".md")
529531

532+
530533
@pytest.mark.usefixtures("tmp_commitizen_project")
531534
def test_changelog_config_flag_increment(
532535
mocker: MockFixture, changelog_path, config_path, file_regression

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /