Skip to content

Commit a918407

Browse files
committed
chore(format): case-insensitive merge commit check
1 parent f15423c commit a918407

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

conventional_pre_commit/format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def is_merge(self, commit_msg: str = ""):
7474
See the documentation, please https://git-scm.com/docs/git-merge.
7575
"""
7676
commit_msg = self.clean(commit_msg)
77-
return commit_msg.startswith("Merge branch ")
77+
return commit_msg.lower().startswith("merge branch ")
7878

7979

8080
class ConventionalCommit(Commit):

tests/test_format.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def test_has_autosquash_prefix(commit, input, expected_result):
396396
"input,expected_result",
397397
[
398398
("Merge branch '2.x.x' into '1.x.x'", True),
399-
("Merge branch 'dev' into 'main'", True),
399+
("merge branch 'dev' into 'main'", True),
400400
("nope not a merge commit", False),
401401
("type: subject", False),
402402
],

0 commit comments

Comments
 (0)