@@ -840,9 +840,6 @@ def check_commit_msg(message, files, repo):
840840 does not contain required marker.
841841
842842 '''
843- if re .match (r'^ccdc-opensource' , repo ):
844- # Do not check for JIRA in opensource repo as we don't want to require external contributors to do this
845- return 0
846843 if re .match (r'^Merge ((remote-tracking )?branch|commit) \'.+?\'( of [^\s]+)? into .+' , message ):
847844 # Not checking for JIRA or large file in commit message generated by github
848845 return 0
@@ -851,6 +848,10 @@ def check_commit_msg(message, files, repo):
851848 # Not checking for JIRA or large file in commit message generated by github
852849 return 0
853850
851+ if re .match (r'^ccdc-opensource' , repo ):
852+ # Do not check for JIRA in opensource repo as we don't want to require external contributors to do this
853+ return 0
854+
854855 if NO_JIRA_MARKER not in message :
855856 if jira_id_pattern .search (message ) is None :
856857 _fail ('Every commit should contain a Jira issue ID or the text '
@@ -938,7 +939,7 @@ def commit_hook(merge=False):
938939def commit_msg_hook ():
939940 retval = 0
940941 files = get_commit_files ()
941- commit_message = Path (sys .argv [1 ]).read_text ()
942+ commit_message = Path (""" sys """ .argv [1 ]).read_text ()
942943
943944 print (' Check commit message ...' )
944945 retval += check_commit_msg (commit_message , files ['M' ] + files ['A' ], get_repo ())
0 commit comments