From 8debb525ba22982800ab421120394b1313cc64ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Fraire=20Willemo=C3=ABs?= Date: Sat, 21 Nov 2020 18:01:00 +0100 Subject: [PATCH] fix: support `!` in cz check command Closes #283 --- commitizen/cz/conventional_commits/conventional_commits.py | 2 +- tests/commands/test_check_command.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/commitizen/cz/conventional_commits/conventional_commits.py b/commitizen/cz/conventional_commits/conventional_commits.py index ba297f8cc..7d5c27570 100644 --- a/commitizen/cz/conventional_commits/conventional_commits.py +++ b/commitizen/cz/conventional_commits/conventional_commits.py @@ -178,7 +178,7 @@ def schema(self) -> str: def schema_pattern(self) -> str: PATTERN = ( - r"(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)" + r"(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)!?" r"(\(\S+\))?:(\s.*)" ) return PATTERN diff --git a/tests/commands/test_check_command.py b/tests/commands/test_check_command.py index 95eb00723..df54c1234 100644 --- a/tests/commands/test_check_command.py +++ b/tests/commands/test_check_command.py @@ -44,6 +44,7 @@ 'Revert "fix(pre-commit): set pre-commit check stage to commit-msg"\n' "This reverts commit afc70133e4a81344928561fbf3bb20738dfc8a0b." ), + "feat!: add user stuff", ]