Use paginate

This commit is contained in:
Michael B. Gale
2026-07-15 11:58:08 +01:00
parent ae48798f3b
commit 41c7af7cf0

View File

@@ -243,12 +243,14 @@ export async function getPrForCommit(
repo: string,
commit: GitHubCommit,
): Promise<AssociatedPullRequest | undefined> {
const { data: prs } =
await client.rest.repos.listPullRequestsAssociatedWithCommit({
const prs = await client.paginate(
client.rest.repos.listPullRequestsAssociatedWithCommit,
{
owner,
repo,
commit_sha: commit.sha,
});
},
);
if (prs.length === 0) {
return undefined;