From b8e29997c6f8797793b261d889b98796ed14d5e5 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Thu, 5 Sep 2019 09:57:15 -0400 Subject: [PATCH] Clean up --- src/main.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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,