Skip to content

Commit

Permalink
fix: revert incorrect date comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
fpicalausa committed May 24, 2022
1 parent 15cf33a commit ec8f7db
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/removeStaleBranches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async function planBranchAction(
latestStaleComment,
params.daysBeforeBranchDelete
).getTime();
if (latestStaleComment <= filters.removeCutoff) {
if (latestStaleComment >= filters.removeCutoff) {
return {
action: "keep stale",
cutoffTime,
Expand Down

0 comments on commit ec8f7db

Please sign in to comment.