Refactor file listing in PR workflow to use pagination

This commit is contained in:
William Harrison authored and GitHub committed 2026-08-19 14:02:16 +08:00
1 parent c4e2f3f653
commit c66a6e9a16
1 file changed
+9 -6
+9 -6
View File
@@ -59,12 +59,15 @@ jobs:
return;
}
const { data: files } = await github.rest.pulls.listFiles({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
per_page: 100
});
const files = await github.paginate(
github.rest.pulls.listFiles,
{
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
per_page: 100
}
);
const domainFiles = files.filter(
(file) =>