Skip to content

Commit af3f8fb

Browse files
authored
🎨 Enable pull request pagination (#353)
* 🎨 Enable pull request pagination * 🚀 Update dist folder * ⬆️ Bump package version * 📝 Remove limitation section
1 parent cc1691e commit af3f8fb

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ Add a status label if the merge was successful or failed.
8888
failure_label: 'failed'
8989
```
9090

91-
# Limitations
92-
93-
- currently only the first 100 pull requests are analyzed
94-
9591
# Release
9692

9793
You can create a new release by creating a new tag and bump the version in `package.json.`

dist/index.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "autodev-action",
3-
"version": "v2.1.0",
3+
"version": "v2.3.0",
44
"description": "Github Action that tries to merge all commits from a PR with the dev label into the dev branch.",
55
"type": "module",
66
"scripts": {

src/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@ export const fetchPulls = async (
2525
owner: string,
2626
repo: string
2727
): Promise<PullsListResponseData> => {
28-
const {data: allPulls} = await octokit.rest.pulls.list({
28+
return await octokit.paginate(octokit.rest.pulls.list, {
2929
owner,
3030
repo,
3131
per_page: 100,
3232
// prioritize old PRs
3333
sort: 'created',
3434
direction: 'asc'
3535
})
36-
return allPulls
3736
}
3837

3938
const magicString = '<!---__GENERATED_BY_AUTO_DEV_ACTION-->'

0 commit comments

Comments
 (0)