diff --git a/main/githooks.py b/main/githooks.py index 4e84717..46b2b89 100755 --- a/main/githooks.py +++ b/main/githooks.py @@ -833,7 +833,7 @@ def check_content(files): return retval -def check_commit_msg(message, files, repo): +def check_commit_msg(message, files): '''Check commit message (and file size). Abort if file size exceeds hard (github.com) limit. @@ -850,10 +850,6 @@ def check_commit_msg(message, files, repo): # Not checking for JIRA or large file in commit message generated by github return 0 - if re.match(r'^ccdc-opensource', repo): - # Do not check for JIRA in opensource repo as we don't want to require external contributors to do this - return 0 - if NO_JIRA_MARKER not in message: if jira_id_pattern.search(message) is None: _fail('Every commit should contain a Jira issue ID or the text ' @@ -899,7 +895,7 @@ def _test(input, is_jira=True): class TestCheckCommitMessage(unittest.TestCase): def test_various_strings(self): def _test(input, is_good=True): - rc = check_commit_msg(input, [], "dummy/repo") + rc = check_commit_msg(input, []) self.assertEqual(rc == 0, is_good) _test('ABC-1234') _test('Some changes for ABC-1234 ticket') @@ -944,6 +940,6 @@ def commit_msg_hook(): commit_message = Path(sys.argv[1]).read_text() print(' Check commit message ...') - retval += check_commit_msg(commit_message, files['M'] + files['A'], get_repo()) + retval += check_commit_msg(commit_message, files['M'] + files['A']) return retval \ No newline at end of file