Skip to content

Commit 0d1ece2

Browse files
committed
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
1 parent bfedf26 commit 0d1ece2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/close-old-issues.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@ Thanks for your understanding and for contributing to NCCL.`;
3838
// Ignore PRs
3939
if (issue.pull_request) continue;
4040

41+
// Ignore issues with label "ongoing"
42+
if (issue.labels.some(label => label.name === "ongoing")) continue;
43+
4144
const createdAt = new Date(issue.created_at);
4245
const updatedAt = new Date(issue.updated_at);
4346

44-
if (createdAt < sixMonthsAgo && updatedAt < oneMonthAgo) {
47+
if (createdAt < sixMonthsAgo && updatedAt < sixMonthsAgo) {
4548

4649
// Add a comment before closing
4750
await octokit.issues.createComment({

0 commit comments

Comments
 (0)