Skip to content

Commit 645ff01

Browse files
committed
Skip the commit message check completely if it's auto-generated (NO_JIRA)
1 parent c2ca166 commit 645ff01

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

main/githooks.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,9 +832,10 @@ def check_commit_msg(message, files):
832832
833833
'''
834834
if re.match(r'^Merge (branch|commit) \'.+?\'( of [^\s]+)? into .+', message):
835-
# Not checking for JIRA in commit message generated by github
836-
pass
837-
elif NO_JIRA_MARKER not in message:
835+
# Not checking for JIRA or large file in commit message generated by github
836+
return 0
837+
838+
if NO_JIRA_MARKER not in message:
838839
if jira_id_pattern.search(message) is None:
839840
_fail('Every commit should contain a Jira issue ID or the text '
840841
f'{NO_JIRA_MARKER}')

0 commit comments

Comments
 (0)