fix: page hint for comment list, keep SSH settings on re-login, hard-link-free downloads, stable OWNER/REPO#N instance (follow gh)

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-18 20:03:15 +02:00
1 parent dfb56eae67
commit 8305a89531
11 files changed
+154 -10

No files matched your search

+7 -3
View File
@@ -53,12 +53,16 @@ func (s Comments) List(ctx context.Context, n int64) ([]Comment, error) {
}
// Page applies CLI pagination to the unpaginated comment collection.
func (s Comments) Page(ctx context.Context, n int64, limit, page int) ([]Comment, error) {
func (s Comments) Page(ctx context.Context, n int64, limit, page int) (Page[Comment], error) {
items, err := s.List(ctx, n)
if err != nil {
return nil, err
return Page[Comment]{}, err
}
return pageOf(items, limit, page)
window, err := pageOf(items, limit, page)
if err != nil {
return Page[Comment]{}, err
}
return Page[Comment]{Items: window, More: len(items) > page*limit, Total: len(items), Counted: true}, nil
}
// NotPlainCommentError reports a comment that the single-comment endpoint answers with no body,