Skip to content

feat: skip merge messages that start with Pull request #487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion commitizen/commands/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ def _filter_comments(self, msg: str) -> str:

@staticmethod
def validate_commit_message(commit_msg: str, pattern: str) -> bool:
if commit_msg.startswith("Merge") or commit_msg.startswith("Revert"):
if (
commit_msg.startswith("Merge")
or commit_msg.startswith("Revert")
or commit_msg.startswith("Pull request")
):
return True
return bool(re.match(pattern, commit_msg))
2 changes: 1 addition & 1 deletion commitizen/config/toml_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _parse_setting(self, data: Union[bytes, str]) -> None:
name = "cz_conventional_commits"
```
"""
doc = parse(data) # type: ignore
doc = parse(data)
try:
self.settings.update(doc["tool"]["commitizen"]) # type: ignore
except exceptions.NonExistentKey:
Expand Down