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,
|
...authorFilters,
|
||||||
];
|
];
|
||||||
|
|
||||||
const response = await octokit.rest.search.issuesAndPullRequests({
|
const issues = await octokit.paginate(
|
||||||
q: q.join("+"),
|
octokit.rest.search.issuesAndPullRequests,
|
||||||
per_page: 100,
|
{
|
||||||
});
|
q: q.join("+"),
|
||||||
|
per_page: 100,
|
||||||
const issues = response.data.items;
|
},
|
||||||
|
);
|
||||||
const issueLines = issues.map((issue, index) => {
|
const issueLines = issues.map((issue, index) => {
|
||||||
const formattedDate = new Date(issue.created_at).toLocaleDateString(
|
const formattedDate = new Date(issue.created_at).toLocaleDateString(
|
||||||
"en-US",
|
"en-US",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue