Skip to content

Commit

Permalink
🎨 Enable pull request pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
flaxel committed Nov 15, 2024
1 parent 248e2e6 commit 32cbe00
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ export const fetchPulls = async (
owner: string,
repo: string
): Promise<PullsListResponseData> => {
const {data: allPulls} = await octokit.rest.pulls.list({
return await octokit.paginate(octokit.rest.pulls.list, {
owner,
repo,
per_page: 100,
// prioritize old PRs
sort: 'created',
direction: 'asc'
})
return allPulls
}

const magicString = '<!---__GENERATED_BY_AUTO_DEV_ACTION-->'
Expand Down

0 comments on commit 32cbe00

Please sign in to comment.