From 281edb6d5429936be8a3b20249103d894ae2575b Mon Sep 17 00:00:00 2001 From: Jordan Layfield <77847327+layfield-ccdc@users.noreply.github.com> Date: Tue, 17 Feb 2026 10:29:36 +0000 Subject: [PATCH 1/4] Update githooks.py NO_JIRA --- main/githooks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/githooks.py b/main/githooks.py index 4e84717..c1f6ccd 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. @@ -946,4 +946,4 @@ def commit_msg_hook(): print(' Check commit message ...') retval += check_commit_msg(commit_message, files['M'] + files['A'], get_repo()) - return retval \ No newline at end of file + return retval From 51ad3264cb68d70055044c203b925bddeb8b0a84 Mon Sep 17 00:00:00 2001 From: Jordan Layfield <77847327+layfield-ccdc@users.noreply.github.com> Date: Tue, 17 Feb 2026 10:31:13 +0000 Subject: [PATCH 2/4] Update githooks.py NO_JIRA --- main/githooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/githooks.py b/main/githooks.py index c1f6ccd..1974135 100755 --- a/main/githooks.py +++ b/main/githooks.py @@ -944,6 +944,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 From e8d7adbb3427ea6a07aa0ad7a8e55a9e9b169a55 Mon Sep 17 00:00:00 2001 From: Jordan Layfield <77847327+layfield-ccdc@users.noreply.github.com> Date: Tue, 17 Feb 2026 10:32:15 +0000 Subject: [PATCH 3/4] Update githooks.py NO_JIRA --- main/githooks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/githooks.py b/main/githooks.py index 1974135..333e688 100755 --- a/main/githooks.py +++ b/main/githooks.py @@ -850,9 +850,9 @@ def check_commit_msg(message, files): # 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 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: From ac031fc10b872d1bad38be75e2e0252ef11464ac Mon Sep 17 00:00:00 2001 From: Jordan Layfield <77847327+layfield-ccdc@users.noreply.github.com> Date: Tue, 17 Feb 2026 10:33:04 +0000 Subject: [PATCH 4/4] Update githooks.py NO_JIRA --- main/githooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/githooks.py b/main/githooks.py index 333e688..d3ee61c 100755 --- a/main/githooks.py +++ b/main/githooks.py @@ -899,7 +899,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')