From dc838eb63befbb7a3c98c3ecd4adf94eb788ef14 Mon Sep 17 00:00:00 2001 From: Prateek Date: Fri, 13 Feb 2026 18:09:15 +0530 Subject: [PATCH] fix: add pagination to getAutomatedComments and increase thread limit - getAutomatedComments: add --paginate flag to REST API call to fetch all review comments beyond the default 30-item first page - getPendingComments: increase GraphQL reviewThreads limit from 100 to 250 (GitHub's max for connections) Co-Authored-By: Claude Opus 4.6 --- packages/plugins/scm-github/src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/plugins/scm-github/src/index.ts b/packages/plugins/scm-github/src/index.ts index 1b224e13a..f64c72cd1 100644 --- a/packages/plugins/scm-github/src/index.ts +++ b/packages/plugins/scm-github/src/index.ts @@ -319,7 +319,7 @@ function createGitHubSCM(): SCM { `query=query($owner: String!, $name: String!, $number: Int!) { repository(owner: $owner, name: $name) { pullRequest(number: $number) { - reviewThreads(first: 100) { + reviewThreads(first: 250) { nodes { isResolved comments(first: 1) { @@ -395,9 +395,10 @@ function createGitHubSCM(): SCM { async getAutomatedComments(pr: PRInfo): Promise { try { - // Single API call gets all review comments (including bot review comments) + // Single paginated API call gets all review comments (including bot review comments) const raw = await gh([ "api", + "--paginate", `repos/${repoFlag(pr)}/pulls/${pr.number}/comments`, ]);