hive-forge: comments --since --limit returns N, not at most 49
The issue-comments endpoint takes no page or limit, so `comments --since` cut its window client-side from a whole-list response. The leftover over-fetch-by-one request (`.page_size(limit + 1)`) was a no-op and the `--limit` clamp to MAX_LIMIT (49) guarded a truncation check that no longer needs one. Drop both: `--since T --limit N` now returns N comments. `comments --json` still emits `since_limit_clamped`, always `false`. `timeline` is untouched; its endpoint pages and its clamp stays.
This commit is contained in:
parent
1d56a74aad
commit
3d81266483
4 changed files with 54 additions and 50 deletions
|
|
@ -101,7 +101,7 @@ pub(crate) fn parse_rfc3339(s: &str) -> Result<OffsetDateTime> {
|
|||
|
||||
/// Forgejo's per-page cap, shared by every listing verb that over-fetches
|
||||
/// by one to detect truncation without an exact total (`timeline`'s
|
||||
/// `--limit`, `comments`' `--since`). The API silently clamps a requested
|
||||
/// `--limit`). The API silently clamps a requested
|
||||
/// page size to this value, so it's pinned explicitly rather than left as
|
||||
/// a hidden default downstream math could drift out of sync with.
|
||||
pub(crate) const PAGE_SIZE: u64 = 50;
|
||||
|
|
|
|||
Loading…
Reference in a new issue