mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
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:
7 files changed
+514
-143
No files matched your search
@@ -174,7 +174,7 @@ func TestMultiItemHumanOutputPagesOnce(t *testing.T) {
|
||||
}{
|
||||
{[]string{"branch", "list"}, "Showing 2 of 2 branches in alice/project\n\nNAME COMMIT PROTECTED UPDATED MESSAGE\nmain (default) abc\ndev def\n"},
|
||||
{[]string{"milestone", "issue", "list", "3"}, "1 Issue 1 closed issue\n2 Issue 2 closed issue\n"},
|
||||
{[]string{"issue", "comment", "list", "5"}, "1 alice\none\n\n2 bob\ntwo\n\n"},
|
||||
{[]string{"issue", "comment", "list", "5"}, "#1 alice\n one\n\n#2 bob\n two\n"},
|
||||
} {
|
||||
t.Run(tc.args[0]+" "+tc.args[1], func(t *testing.T) {
|
||||
deps, out, _, pager := pagedDeps(t, server.URL, nil, "pager", "fake-pager", "color", "never", "hyperlinks", "never")
|
||||
|
||||
Reference in new issue
Block a user