GRM-35: fix: bypass commit-msg hook for release commits

Release commits use --no-verify to bypass the commit-msg hook since they are generated by the release script, not by a developer.

Closes GRM-35
This commit is contained in:
emil
2026-06-21 19:15:55 +00:00
parent 3dcdde80ad
commit 76d9983514
2 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -221,7 +221,7 @@ class TestCommitReleaseChanges:
assert result is True
calls = [c.args[0] for c in mock_run_cmd.call_args_list]
assert ["git", "add", "src/gitea_runner_manager/__init__.py", "CHANGELOG.md"] in calls
assert ["git", "commit", "-m", "release: v0.2.0"] in calls
assert ["git", "commit", "--no-verify", "-m", "release: v0.2.0"] in calls
@patch("scripts.release.run_cmd")
def test_skips_when_no_changes(self, mock_run_cmd: MagicMock) -> None:
@@ -230,7 +230,7 @@ class TestCommitReleaseChanges:
result = commit_release_changes("0.1.0")
assert result is False
calls = [c.args[0] for c in mock_run_cmd.call_args_list]
assert ["git", "commit", "-m", "release: v0.1.0"] not in calls
assert ["git", "commit", "--no-verify", "-m", "release: v0.1.0"] not in calls
class TestCreateAndPushTag: