forge issue view and pr view cannot return the raw body, so a body edit has to be retyped #190
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools#190
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Let
forge issue viewandforge pr viewreturn the raw body, so an edit can be built from what is actually there rather than retyped from rendered output.Primary goals:
forge issue edit --body-filereplaces the whole body, so appending one line today means reconstructing the body from the rendered view, and anything another writer added meanwhile is silently dropped.forge pr viewhas the same gap and takes the same fix.gh's established shape —gh issue view <n> --json body --jq .bodyalready solves this;cli-design.mdsays copy it rather than invent a local flag.Current state and specifics
forge issue view <number>prints a rendered summary —Issue #N:,State:,Author:,Labels:,Milestone:— then the body, then every comment. Its only flag is-R/--repo. There is no way to ask for the body alone, so a caller that wants to append a paragraph must strip the header, guess where the body ends and the comments begin, and trust that the renderer left the text untouched.The REST fallback is not available: the token in
~/.netrccarries almost no API scope, andGET /api/v1/repos/<owner>/<repo>/issues/<n>returns 403token does not have at least one of required scope(s): [read:issue].The practical consequence is that an agent asked to add a line to an issue posts a comment instead, because a comment cannot clobber anything. That is the correct call under the current tool, but it files scope decisions in the comment thread instead of the Scope section where the next reader looks — which happened on
allod/tools#182.Scope
In scope: read-side output for
issue viewandpr view, and whichever field set is worth exposing beyondbody. Out of scope: an in-place append or edit verb — once the raw body round-trips, the existing--body-filecomposes with it.