Skip to content

fix(release): preflight the release branch namespace before createRef - #13

Merged
chhoumann merged 1 commit into
mainfrom
fix/release-namespace-preflight
Jul 11, 2026
Merged

fix(release): preflight the release branch namespace before createRef#13
chhoumann merged 1 commit into
mainfrom
fix/release-namespace-preflight

Conversation

@chhoumann

Copy link
Copy Markdown
Owner

Found on QuickAdd's first prepare run: a stale branch literally named release (a stray semantic-release version commit from 2025) makes creating release/x.y.z impossible - git cannot hold both refs/heads/release and refs/heads/release/* - and the failure surfaces as a bare HttpError: Reference update failed (422) from POST /git/refs, which is deterministic but completely opaque.

The open-pr step now preflights the namespace before creating any git objects: it lists heads/release matching refs and fails with an actionable message ("delete or rename the 'release' branch") when the exact bare ref exists. Detection uses listMatchingRefs with an exact-match filter rather than getRef, which is ambiguous on prefix collisions.

The same preflight for release-run/<version> recovery branches in the validate stage lands with the validate rewrite PR in this stack, along with the README migration-checklist note.

Fixes #10

@chhoumann
chhoumann merged commit bb7b9c2 into main Jul 11, 2026
1 check passed
@chhoumann
chhoumann deleted the fix/release-namespace-preflight branch July 11, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release-prepare: preflight the release/* refname namespace before createRef

1 participant