From ec8f7db01987b6877f11ff1007b89b8bc527d0ed Mon Sep 17 00:00:00 2001 From: Francois Picalausa Date: Tue, 24 May 2022 19:01:08 +0900 Subject: [PATCH] fix: revert incorrect date comparison --- dist/index.js | 2 +- package.json | 2 +- src/removeStaleBranches.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index 161fbc0..b57a359 100644 --- a/dist/index.js +++ b/dist/index.js @@ -31717,7 +31717,7 @@ function planBranchAction(now, branch, filters, commitComments, params) { return Math.max(commentDate, latestDate); }, 0); const cutoffTime = (0, date_fns_1.addDays)(latestStaleComment, params.daysBeforeBranchDelete).getTime(); - if (latestStaleComment <= filters.removeCutoff) { + if (latestStaleComment >= filters.removeCutoff) { return { action: "keep stale", cutoffTime, diff --git a/package.json b/package.json index 49dc96a..1ee1da1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "remove-stale-branches", "private": true, - "version": "1.5.3", + "version": "1.5.4", "description": "Cleanup stale branches from a repository", "main": "src/index.ts", "author": "Francois Picalausa ", diff --git a/src/removeStaleBranches.ts b/src/removeStaleBranches.ts index 3b1c91e..d820d63 100644 --- a/src/removeStaleBranches.ts +++ b/src/removeStaleBranches.ts @@ -163,7 +163,7 @@ async function planBranchAction( latestStaleComment, params.daysBeforeBranchDelete ).getTime(); - if (latestStaleComment <= filters.removeCutoff) { + if (latestStaleComment >= filters.removeCutoff) { return { action: "keep stale", cutoffTime,