Skip to content

Commit 41c7af7

Browse files
committed
Use paginate
1 parent ae48798 commit 41c7af7

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎pr-checks/update-release-branch.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,14 @@ export async function getPrForCommit(
243243
repo: string,
244244
commit: GitHubCommit,
245245
): Promise<AssociatedPullRequest | undefined> {
246-
const { data: prs } =
247-
await client.rest.repos.listPullRequestsAssociatedWithCommit({
246+
const prs = await client.paginate(
247+
client.rest.repos.listPullRequestsAssociatedWithCommit,
248+
{
248249
owner,
249250
repo,
250251
commit_sha: commit.sha,
251-
});
252+
},
253+
);
252254

253255
if (prs.length === 0) {
254256
return undefined;

0 commit comments

Comments
 (0)