Use pagination for GitHub issue response script (#27838)

Release Notes:

- N/A
This commit is contained in:
Joseph T. Lyons 2025-04-01 08:16:11 -04:00 committed by GitHub
parent 0079771e34
commit a24fc5a1a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,12 +61,13 @@ async function main() {
...authorFilters,
];
const response = await octokit.rest.search.issuesAndPullRequests({
q: q.join("+"),
per_page: 100,
});
const issues = response.data.items;
const issues = await octokit.paginate(
octokit.rest.search.issuesAndPullRequests,
{
q: q.join("+"),
per_page: 100,
},
);
const issueLines = issues.map((issue, index) => {
const formattedDate = new Date(issue.created_at).toLocaleDateString(
"en-US",