GRM-58: fix: enforce commit message convention on master with CI validation
This commit is contained in:
@@ -294,7 +294,7 @@ def main(branch: str, pr_title: str, repo: str, pr_number: str, label_name: str)
|
||||
conv_msg = extract_conventional_msg(commits)
|
||||
if not conv_msg:
|
||||
raise click.ClickException(_("Could not extract conventional commit message from PR commits."))
|
||||
merge_title = f"{task_id} {conv_msg}"
|
||||
merge_title = f"{task_id}: {conv_msg}"
|
||||
|
||||
try:
|
||||
client.merge_pr(pr_number, merge_title)
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user