issue detail: flag to list all comment pages (noninteractively) #403

Open
opened 1 year ago by Helix · 3 comments
Helix commented 1 year ago

To export Issues (see also: #132), one could loop over all Issues and write the output into a file.

However, when there are comments, tea issue ls asks if you want to see them (? show comments? [Y/n]).

Maybe there can be an env variable or command line flag to show all comments by default so you can pipe tea's output into a file.

I suggest --show-all-comments or short form tea issue ls -a NUMBER or tea issue ls -c NUMBER.

Related:

To export Issues (see also: #132), one could loop over all Issues and write the output into a file. However, when there are comments, `tea issue ls` asks if you want to see them (`? show comments? [Y/n]`). Maybe there can be an env variable or command line flag to show all comments by default so you can pipe tea's output into a file. I suggest `--show-all-comments` or short form `tea issue ls -a NUMBER` or `tea issue ls -c NUMBER`. Related: * [go-gitea/gitea/#4808](https://github.com/go-gitea/gitea/issues/4808) *Export issues to Excel and/or generate PDF*
Collaborator

This is actually possible already:

tea issue --comments 403

note that this is argument order sensitive.

It looks like your use case is pdf summary generation; when you get a pipeline working without #132, would be nice to share it, I'm interested!

This is actually possible already: ``` tea issue --comments 403 ``` note that this is argument order sensitive. It looks like your use case is pdf summary generation; when you get a pipeline working without #132, would be nice to share it, I'm interested!
Collaborator

The above suggestion still only fetches a single page (as specified via --page and --limit), all comments is not supported currently; so we can leave this issue open as enhancement.
A workaround covering ~ >98% of real world issues would probably be

tea issue --comments --limit 100 <idx>

Alternative title: Add --all flag (item listings + issue comments)

The above suggestion still only fetches a single page (as specified via `--page` and `--limit`), all comments is not supported currently; so we can leave this issue open as enhancement. A workaround covering ~ >98% of real world issues would probably be ``` tea issue --comments --limit 100 <idx> ``` Alternative title: Add `--all` flag (item listings + issue comments)
noerw added the kind/enhancement label 1 year ago
noerw changed title from non-interactive output of issues to issue detail: flag to list all comment pages (noninteractively) 1 year ago
Collaborator

depends on gitea/go-sdk#396

depends on https://gitea.com/gitea/go-sdk/issues/396
noerw added the upstream/sdk label 12 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: gitea/tea#403
Loading…
There is no content yet.