chore: run format
This commit is contained in:
6
.github/scripts/auto-close-duplicates.mjs
vendored
6
.github/scripts/auto-close-duplicates.mjs
vendored
@@ -84,7 +84,7 @@ async function autoCloseDuplicates() {
|
|||||||
|
|
||||||
const MAX_PAGES = 50; // Increase limit for larger repos
|
const MAX_PAGES = 50; // Increase limit for larger repos
|
||||||
let foundRecentIssue = false;
|
let foundRecentIssue = false;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
const pageIssues = await githubRequest(
|
const pageIssues = await githubRequest(
|
||||||
`/repos/${owner}/${repo}/issues?state=open&per_page=${perPage}&page=${page}&sort=created&direction=desc`,
|
`/repos/${owner}/${repo}/issues?state=open&per_page=${perPage}&page=${page}&sort=created&direction=desc`,
|
||||||
@@ -99,13 +99,13 @@ async function autoCloseDuplicates() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
allIssues.push(...oldEnoughIssues);
|
allIssues.push(...oldEnoughIssues);
|
||||||
|
|
||||||
// If all issues on this page are newer than 3 days, we can stop
|
// If all issues on this page are newer than 3 days, we can stop
|
||||||
if (oldEnoughIssues.length === 0 && page === 1) {
|
if (oldEnoughIssues.length === 0 && page === 1) {
|
||||||
foundRecentIssue = true;
|
foundRecentIssue = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we found some old issues but not all, continue to next page
|
// If we found some old issues but not all, continue to next page
|
||||||
// as there might be more old issues
|
// as there might be more old issues
|
||||||
page++;
|
page++;
|
||||||
|
|||||||
Reference in New Issue
Block a user