Exclude ongoing issues from auto-closing logic

- Added a check to skip issues labeled "ongoing" in the close-old-issues script
- Adjusted the condition to compare both creation and update dates against six months ago
This commit is contained in:
Stephen Sachs 2025-07-17 21:50:05 +02:00
parent bfedf2629e
commit 0d1ece2b43
1 changed files with 4 additions and 1 deletions

View File

@ -38,10 +38,13 @@ Thanks for your understanding and for contributing to NCCL.`;
// Ignore PRs
if (issue.pull_request) continue;
// Ignore issues with label "ongoing"
if (issue.labels.some(label => label.name === "ongoing")) continue;
const createdAt = new Date(issue.created_at);
const updatedAt = new Date(issue.updated_at);
if (createdAt < sixMonthsAgo && updatedAt < oneMonthAgo) {
if (createdAt < sixMonthsAgo && updatedAt < sixMonthsAgo) {
// Add a comment before closing
await octokit.issues.createComment({