Skip to content

Commit 02ca578

Browse files
Merge pull request #30 from ccdc-opensource/layfield-ccdc-patch-1
Update githooks.py NO_JIRA
2 parents 2280909 + ac031fc commit 02ca578

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

main/githooks.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ def check_content(files):
833833
return retval
834834

835835

836-
def check_commit_msg(message, files, repo):
836+
def check_commit_msg(message, files):
837837
'''Check commit message (and file size).
838838
839839
Abort if file size exceeds hard (github.com) limit.
@@ -850,9 +850,9 @@ def check_commit_msg(message, files, repo):
850850
# Not checking for JIRA or large file in commit message generated by github
851851
return 0
852852

853-
if re.match(r'^ccdc-opensource', repo):
854-
# Do not check for JIRA in opensource repo as we don't want to require external contributors to do this
855-
return 0
853+
# if re.match(r'^ccdc-opensource', repo):
854+
# # Do not check for JIRA in opensource repo as we don't want to require external contributors to do this
855+
# return 0
856856

857857
if NO_JIRA_MARKER not in message:
858858
if jira_id_pattern.search(message) is None:
@@ -899,7 +899,7 @@ def _test(input, is_jira=True):
899899
class TestCheckCommitMessage(unittest.TestCase):
900900
def test_various_strings(self):
901901
def _test(input, is_good=True):
902-
rc = check_commit_msg(input, [], "dummy/repo")
902+
rc = check_commit_msg(input, [])
903903
self.assertEqual(rc == 0, is_good)
904904
_test('ABC-1234')
905905
_test('Some changes for ABC-1234 ticket')
@@ -944,6 +944,6 @@ def commit_msg_hook():
944944
commit_message = Path(sys.argv[1]).read_text()
945945

946946
print(' Check commit message ...')
947-
retval += check_commit_msg(commit_message, files['M'] + files['A'], get_repo())
947+
retval += check_commit_msg(commit_message, files['M'] + files['A'])
948948

949-
return retval
949+
return retval

0 commit comments

Comments
 (0)