diff --git a/.github/workflows/perf-pr-repeat.yml b/.github/workflows/perf-pr-repeat.yml index f385430d9..3ccc631c5 100644 --- a/.github/workflows/perf-pr-repeat.yml +++ b/.github/workflows/perf-pr-repeat.yml @@ -221,7 +221,9 @@ jobs: // Resolved in the refs step so it works for both pull_request and // workflow_dispatch (where there's no pull_request in the payload). const issue_number = Number(process.env.PR); - const {data: comments} = await github.rest.issues.listComments({owner, repo, issue_number}); + // paginate: the default page is 30, and a sticky upsert past that + // silently duplicates. Same call in perf-pr.yml. + const comments = await github.paginate(github.rest.issues.listComments, {owner, repo, issue_number}); const existing = comments.find(c => c.body && c.body.includes(marker)); if (existing) { await github.rest.issues.updateComment({owner, repo, comment_id: existing.id, body}); diff --git a/.github/workflows/perf-pr.yml b/.github/workflows/perf-pr.yml index c8e52ece0..37e617bda 100644 --- a/.github/workflows/perf-pr.yml +++ b/.github/workflows/perf-pr.yml @@ -204,7 +204,9 @@ jobs: // Resolved in the refs step so it works for both pull_request and // workflow_dispatch (where there's no pull_request in the payload). const issue_number = Number(process.env.PR); - const {data: comments} = await github.rest.issues.listComments({owner, repo, issue_number}); + // paginate: the default page is 30, and a sticky upsert past that + // silently duplicates. Same call in perf-pr-repeat.yml. + const comments = await github.paginate(github.rest.issues.listComments, {owner, repo, issue_number}); const existing = comments.find(c => c.body && c.body.includes(marker)); if (existing) { await github.rest.issues.updateComment({owner, repo, comment_id: existing.id, body});