diff --git a/conventional_pre_commit/format.py b/conventional_pre_commit/format.py index 5b7ec83..28a840a 100644 --- a/conventional_pre_commit/format.py +++ b/conventional_pre_commit/format.py @@ -74,7 +74,7 @@ def is_merge(self, commit_msg: str = ""): See the documentation, please https://git-scm.com/docs/git-merge. """ commit_msg = self.clean(commit_msg) - return commit_msg.startswith("Merge branch ") + return commit_msg.lower().startswith("merge branch ") class ConventionalCommit(Commit): diff --git a/tests/test_format.py b/tests/test_format.py index 617f61a..a52b9bc 100644 --- a/tests/test_format.py +++ b/tests/test_format.py @@ -396,7 +396,7 @@ def test_has_autosquash_prefix(commit, input, expected_result): "input,expected_result", [ ("Merge branch '2.x.x' into '1.x.x'", True), - ("Merge branch 'dev' into 'main'", True), + ("merge branch 'dev' into 'main'", True), ("nope not a merge commit", False), ("type: subject", False), ],