Skip to content

Commit e645e53

Browse files
committed
Skip JIRA marker check when merging also from remote tracking branch
NO_JIRA
1 parent 60123de commit e645e53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main/githooks.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ def check_commit_msg(message, files):
830830
does not contain required marker.
831831
832832
'''
833-
if re.match(r'^Merge (branch|commit) \'.+?\'( of [^\s]+)? into .+', message):
833+
if re.match(r'^Merge ((remote-tracking )?branch|commit) \'.+?\'( of [^\s]+)? into .+', message):
834834
# Not checking for JIRA or large file in commit message generated by github
835835
return 0
836836

@@ -888,6 +888,7 @@ def _test(input, is_good=True):
888888
_test("Merge branch 'branch_1' into branch_2")
889889
_test("Merge branch 'jira_pyapi_123_abc' of github.com:ccdc-confidential/cpp-apps-main into jira_pyapi_123_abc")
890890
_test("Merge commit 'abcdef' into jira_mer_123_abc")
891+
_test("Merge remote-tracking branch 'origin/release/2022.1' into merge_from_release")
891892
_test('I forgot to add the jira marker!', False)
892893
_test('Close but no cigar abc-1234', False)
893894

0 commit comments

Comments
 (0)