hive-forge: fetch issue comments in one request; the endpoint has no paging
The forge's issue-comments endpoint takes no page or limit and always returns the whole thread. #5055 wrapped view's fetch in all_pages, which never saw a short page on a thread of 50+ comments and fetched the same list 50 times: `issue view 3782` printed 3000 comments instead of 60. `comments --limit K` sent K as a page size the forge ignored, so it returned the whole thread. view and pr status's last_comment now send one request. comments fetches the thread once and cuts the --limit / --tail window client-side; the X-Total-Count probe and the computed-page tail walk are gone, and the count of comments outside the window is the length of the list. --since is unchanged. tests/comments_no_paging.rs runs the binary against a loopback mock forge whose comments route ignores page and limit, as Forgejo's does.
This commit is contained in:
parent
6f8a6ab8e0
commit
1d56a74aad
6 changed files with 215 additions and 262 deletions
|
|
@ -42,7 +42,7 @@ hive-forge issue create --title "..." --body "..."
|
|||
# --- flat aliases below remain valid (hidden) ---
|
||||
hive-forge view 42 # title + body + comments (marks thread read)
|
||||
hive-forge comments 42 # list all comments (human-readable; marks thread read); for PRs, review bodies merged in
|
||||
hive-forge comments 42 --tail 10 # last 10 comments (count-then-page; efficient on long threads)
|
||||
hive-forge comments 42 --tail 10 # last 10 comments (fetches the whole thread, shows the tail)
|
||||
hive-forge --json comments 42 # same as above, JSON array (global flag)
|
||||
hive-forge comment 42 --body "..." # post comment (inline body)
|
||||
hive-forge comment 42 --body-file - <<EOF # ...or pipe a HEREDOC
|
||||
|
|
|
|||
Loading…
Reference in a new issue