From 7c2598f3943a6a9b4ee207ca357626ba5990e7c2 Mon Sep 17 00:00:00 2001 From: aryank97531 Date: Tue, 11 Aug 2026 21:58:54 +1000 Subject: [PATCH] fix(api): rely on Link header rel=next and empty list check for pagination --- workspace/pkg/github/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/workspace/pkg/github/client.go b/workspace/pkg/github/client.go index 1f33f4c..3db36b7 100644 --- a/workspace/pkg/github/client.go +++ b/workspace/pkg/github/client.go @@ -52,6 +52,10 @@ func (c *Client) GetIssues(owner, repo string, perPage int) ([]Issue, error) { return nil, err } + if len(issues) == 0 { + break + } + allIssues = append(allIssues, issues...) nextURL = getNextPageURL(resp.Header.Get("Link"))