Repository navigation
fix(release): tolerate squash-merge subject suffix in resume derivation - #43
Merged
Merged
Conversation
wakemeup0
added a commit
that referenced
this pull request
Sep 18, 2026
wakemeup0
added a commit
to openhoo/hooray
that referenced
this pull request
Sep 18, 2026
…#114) ## Summary Adopts Hooversion v1.1.2, which fixes the protected-branch release finalize for GitHub squash-merged release PRs. ## Why The v0.7.0 release finalize failed: PR #106 squash-merged as `chore(release): hooray 0.7.0 (#106)` and Hooversion v1.1.1's release-resume derivation rejected the trailing ` (#N)` subject suffix, falling back to a fresh-release plan that attempted a forbidden direct push to protected `main` (run 35275750107). Hooversion v1.1.2 (openhoo/hooversion#43) strips a single trailing ` (#<digits>)` suffix in both `DeriveResumableWithEnv` and `isResumableReleaseWithEnv`, with byte-identical behavior for suffix-free subjects. ## Changes - Pin `hooversion/actions/{lint,prepare-release,release}` to the v1.1.2 peeled commit `f0a37cca2` - `HOOVERSION_VERSION: "1.1.2"` ## Verification - Tag `v1.1.2` peeled commit verified against `openhoo/hooversion` refs - `actionlint` clean on both workflows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Protected-branch release pull requests are squash-merged by GitHub with a
(#N)suffix appended to the commit subject, e.g.chore(release): hooray 0.7.0 (#106).DeriveResumableWithEnvthen fails to recognize the release commit:versions[name] != versionbecause the parsed version is0.7.0 (#106)name@versionsegment carries the same suffixCommitMessagecomparison also rejects the subjectThe release command then falls back to a fresh plan and attempts a forbidden direct push to the protected branch (observed stranding the openhoo/hooray 0.7.0 release).
Fix
(#<digits>)from the HEAD subject before prefix/parsing inDeriveResumableWithEnv(covers both the single-packageCutpath and the multi-package,split path).releaseMessageMatcheshelper compares a HEAD message against the expected release message with the same suffix tolerance; used by both the final reconstruction check inDeriveResumableWithEnvandisResumableReleaseWithEnv(without it, a suffixed HEAD falls intoverifySourceand fails with "Release source changed locally").Compatibility / security impact
No behavior change for suffix-free commit subjects. Only subjects ending in a literal
(#<digits>)gain tolerance; other suffixes (e.g.(alpha)) are still rejected. No public action contract changes.Tests
TestResumesSquashMergedReleaseCommitWithPullRequestSuffix— single-package(#106)subject resumes and recreates the missing tag without extra commitsTestResumesMultiPackageReleaseCommitWithPullRequestSuffix—one@0.2.0, two@0.4.0 (#42)subject resumes both releasesTestRejectsReleaseCommitWithNonNumericSubjectSuffix—(alpha)suffix still derives no resumable plangofmt,go vet ./...,go build ./...,go test -race -count=1 ./...all green.