From 0d1ece2b43ba1d85c76746ce63505f6db6b6b2f4 Mon Sep 17 00:00:00 2001 From: Stephen Sachs Date: Thu, 17 Jul 2025 21:50:05 +0200 Subject: [PATCH] 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 --- .github/workflows/close-old-issues.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/close-old-issues.js b/.github/workflows/close-old-issues.js index 9605aa023a..57e1103396 100644 --- a/.github/workflows/close-old-issues.js +++ b/.github/workflows/close-old-issues.js @@ -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({