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 <noreply@anthropic.com>
This commit is contained in:
parent
e4a803edde
commit
dc838eb63b
|
|
@ -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<AutomatedComment[]> {
|
||||
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`,
|
||||
]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue