From 2ff579fa89e6f0c5662533d5e9e3048062d218f8 Mon Sep 17 00:00:00 2001 From: Alexander Jung Date: Thu, 22 Apr 2021 21:02:27 +0200 Subject: [PATCH] api: Correct PR comment list type and pagination Signed-off-by: Alexander Jung --- api/github.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/github.go b/api/github.go index d203f12..9f3942c 100644 --- a/api/github.go +++ b/api/github.go @@ -163,7 +163,12 @@ func (c *GithubClient) ListPullRequestComments(prID int) ([]*github.IssueComment c.Owner, c.Repository, prID, - &github.PullRequestListCommentsOptions{}, + &github.IssueListCommentsOptions{ + ListOptions: github.ListOptions{ + // TODO: We need to break up requests and be good API consumers + PerPage: 1000, + }, + }, ) if err != nil { return nil, err