From 437e318240a0579f62ba567a3e33e469d0abe926 Mon Sep 17 00:00:00 2001 From: claw Date: Wed, 13 May 2026 18:01:57 -0700 Subject: [PATCH] nit: clarify truncation detection comment in ListReviews Expand the inline comment at the page==maxPages check to more explicitly explain why a full final page implies truncation. --- github/reviews.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/github/reviews.go b/github/reviews.go index 3e87dbc..a49a915 100644 --- a/github/reviews.go +++ b/github/reviews.go @@ -197,8 +197,10 @@ func (c *Client) ListReviews(ctx context.Context, owner, repo string, number int break } - // If we just fetched page maxPages and it was full (the short-page break - // above didn't fire), more reviews likely exist beyond our limit. + // Truncation detection: this runs on the final allowed iteration + // (page == maxPages) only when the page was full (the len < perPage + // early-break above didn't fire). A full final page means additional + // reviews likely exist beyond our pagination limit. if page == maxPages { truncated = true }