GRM-58: fix: enforce commit message convention on master with CI validation

This commit is contained in:
2026-06-22 10:12:01 +00:00
parent 3ae263fb00
commit 7d3cf999d6
6 changed files with 49 additions and 6 deletions
+4 -2
View File
@@ -37,11 +37,13 @@ def get_branch() -> str:
@click.command()
@click.argument("commit_msg_file")
def main(commit_msg_file: str) -> None:
@click.option("--branch", default=None, help="Override branch detection (for CI use).")
def main(commit_msg_file: str, branch: str | None) -> None:
with open(commit_msg_file) as f:
msg = f.read().strip()
branch = get_branch()
if branch is None:
branch = get_branch()
subject = first_line(msg)
if branch == "master":