Skip to content

fix(release): require --sha only for tag-creating manage-release actions - #346

Merged
joshua-temple merged 1 commit into
mainfrom
fix/manage-release-sha-optional
Jun 25, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
fix/manage-release-sha-optional

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

cascade manage-release validated --sha as required for every action, but only create/prerelease/publish tag a commit and need it. lock/update/delete resolve the release by tag (SHA is only an optional disambiguator). The over-strict check made the generator's own emitted manage-release --action delete --sha "" --tag ... || true always error (masked by || true), and broke a lock verb on the live fleet (surfaced by new primary suite coverage).

Fix

Extract validateManageReleaseFlags; gate the --sha is required check to {create, prerelease, publish} only. repo/action/environment/tag stay required. New unit test asserts lock/update/delete validate without --sha while create/prerelease/publish still require it (RED→GREEN, 8 subtests). Build + go test ./... + golangci-lint clean.

Closes the primary-fleet lock/delete failure. The integration exercise is the primary suite's lock/delete verbs.

manage-release validated --sha as required for every action, but lock, update, and delete resolve the release by tag (SHA is only an optional disambiguator); only create, prerelease, and publish tag a commit and genuinely need it. The over-strict check made the generator's emitted 'manage-release --action delete --sha ""' always error (masked by '|| true'), and broke a lock verb on the fleet. Gate the requirement to the tag-creating actions.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit 137b501 into main Jun 25, 2026
13 checks passed
@joshua-temple
joshua-temple deleted the fix/manage-release-sha-optional branch June 25, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant