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 c247670

Browse files
BogayLee-W
authored andcommitted
fix(ConventionalCommitsCz): cz's schema validates the whole commit message now
1 parent fc4ebc8 commit c247670

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎commitizen/cz/conventional_commits/conventional_commits.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,11 @@ def schema(self) -> str:
191191

192192
def schema_pattern(self) -> str:
193193
PATTERN = (
194-
r"(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)"
195-
r"(\(\S+\))?!?:(\s.*)"
194+
r"(?s)" # To explictly make . match new line
195+
r"(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)" # type
196+
r"(\(\S+\))?!?:" # scope
197+
r"( [^\n\r]+)" # subject
198+
r"((\n\n.*)|(\s*))?$"
196199
)
197200
return PATTERN
198201

0 commit comments

Comments
(0)

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