diff --git a/src/main.ts b/src/main.ts index e725be74..2624cfb4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -66,16 +66,11 @@ async function processIssues( if (exemptLabel && isLabeled(issue, exemptLabel)) { continue; } else if (isLabeled(issue, staleLabel)) { - if (args.daysBeforeClose < 0) { + if (args.daysBeforeClose >= 0 && wasLastUpdatedBefore(issue, args.daysBeforeClose)) { + operationsLeft -= await closeIssue(client, issue); + } else { continue; } - else { - if (wasLastUpdatedBefore(issue, args.daysBeforeClose)) { - operationsLeft -= await closeIssue(client, issue); - } else { - continue; - } - } } else if (wasLastUpdatedBefore(issue, args.daysBeforeStale)) { operationsLeft -= await markStale( client,