fix(cli): bind --tag to tag_name in release create/update dispatcher #34
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/release-create-tag-flag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
--tagnow actually fillstag_namewhen used onrelease create/release update; the help line was previously a lie because the parserwrote to the orphan key
tagwhile the dispatcher readtag_name.--new-tagalias (same key, now reachable through--tag).release update's help line and its "at least one of" errormessage with the unified flag.
Why
Bug report:
forgejoctl release create --tag vX.Y.Z ...exited 1 with"error: --tag is required for release create" despite the user having
supplied exactly that flag. Workaround
--new-tagworked.The fix is one parser key rename plus two help-line touch-ups. The
MCP/OpenCode adapters were unaffected — they take
tag_namedirectly.Verification
Local only — no live host touch.
The three new tests in
src/adapters/cli/main.test.ts(in the existingdescribe("CLI release/tag subcommands via main()")) cover:release create --tag vX.Y.Zposts{tag_name: "vX.Y.Z", …}.--tag=vX.Y.Z(= form) is accepted.--tagexits 2 with the documented error and never hitsfetch.
Pre-fix the first two tests failed with
code: 2(the bug reproducedthrough
main()). Post-fix all three pass.Manual live smoke against
forge.sebatec.euis intentionally notincluded here — the user's environment policy is "nicht auf Produktion
testen", so any release/tag dance against the real host is for them,
not for CI.
Out of scope
to
POST /tags); the user's documented flow isgit push vX.Y.Z && forgejoctl release create --tag vX.Y.Z, whichthe Forgejo server accepts as-is.
enforces a unique constraint on
LowerTagNameand we just propagatethe 409. Belongs in a separate policy decision.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.