Documentation
¶
Overview ¶
Command ghrel writes to a GitHub release that ALREADY EXISTS: edit its title and notes, upload assets, or delete the release (never its tag).
It exists because the fleet's guard refuses a hand-written `gh release edit|upload|delete` and asks for a program, and the only release program, gitsafe's ghrelease, creates releases and nothing else. Release CREATION stays there: `ghrelease --release-only owner/repo <tag>` creates the release of an existing tag (its --help: "create the GitHub release of an EXISTING tag, and nothing else"). ghrel does not duplicate it.
Same model as ghissue: the token is read from a 0600 file and sent only in the Authorization header; https only (http for 127.0.0.1 test servers); redirects are refused; responses are bounded; the release is shown before anything is sent; what is printed after is what the API reports.
References (read 2026-11-08):
https://docs.github.com/en/rest/releases/releases GET /repos/{o}/{r}/releases/tags/{tag} (200|404, published releases only);
PATCH /repos/{o}/{r}/releases/{id}, optional "name" and "body", 200;
DELETE /repos/{o}/{r}/releases/{id}, 204 (the page does not say what happens to the tag:
ghrel never calls a tag endpoint and says so); "upload_url" is the upload endpoint
https://docs.github.com/en/rest/releases/assets POST {upload_url}?name=&label=, host uploads.github.com, raw body, Content-Type required,
201, reply has "name", "size", "state"; a duplicate file name is 422 (delete the
old asset first: DELETE /repos/{o}/{r}/releases/assets/{id}, 204); GitHub may
rename a file with special characters; a 502 may leave an empty asset in state "starter"