feat(comment): comment on issues and pull requests the gh way

tea issue comment 12 --body "LGTM" failed with "unknown flag: --body"; the
comment had to be created with issue comment create. issue comment and
pr comment now take the issue or pull request and -b/-F/-e directly,
plus --edit-last and --delete-last for your last comment. The
subcommands stay, create is also add, and a misspelled subcommand
suggests the right one.

Comments are written in the configured editor or a multi-line
"Comment (markdown):" field, which edits start from the current text,
without a confirmation afterwards. The new comment's URL goes to stdout
with a ✓ line; deletes ask "Delete comment 81 on alice/x#1?". comment
list shows each comment under a "#79 alice • about 2 hours ago"
heading on a terminal and as key/value blocks when piped, and comment
JSON gains issue_number.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-12 00:16:09 +02:00
1 parent 0b6232087e
commit 10417049a1
7 files changed
+514 -143

No files matched your search

-12
View File
@@ -424,11 +424,6 @@ const (
issue attachment list
issue attachment upload
issue attachment view
issue comment create
issue comment delete
issue comment edit
issue comment list
issue comment view
label create
label delete
label edit
@@ -450,11 +445,6 @@ const (
pr attachment list
pr attachment upload
pr attachment view
pr comment create
pr comment delete
pr comment edit
pr comment list
pr comment view
search issue
search pr
time create
@@ -464,12 +454,10 @@ const (
`
longsToWrite = `
issue attachment
issue comment
label
milestone
milestone issue
pr attachment
pr comment
time
`
)