fix: strip heads/ prefix from branch name in release check
CI / pr-review (pull_request) Successful in 36s
CI / detect-changes (pull_request) Successful in 55s
CI / quality (pull_request) Successful in 1m7s
CI / auto-merge (pull_request) Failing after 13s
CI / release-dry-run (pull_request) Successful in 33s

This commit is contained in:
emil
2026-06-24 12:46:43 +02:00
parent 6985030a3c
commit 3c9c614813
+2
View File
@@ -547,6 +547,8 @@ def main(dry_run: bool, skip_tests: bool, verify: bool) -> None:
# Ensure we're on master (skip this check in dry-run mode for PR validation)
branch = run_cmd(["git", "rev-parse", "--abbrev-ref", "HEAD"]).stdout.strip()
# Some git versions return "heads/master" instead of "master"
branch = branch.removeprefix("heads/")
if branch != "master" and not dry_run:
raise click.ClickException(_("Release must be run on master, currently on '{branch}'.", branch=branch))
if branch != "master" and dry_run: