Use pagination for GitHub issue response script (#27838)
Release Notes: - N/A
This commit is contained in:
parent
0079771e34
commit
a24fc5a1a5
1 changed files with 7 additions and 6 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue