Skip to content

Commit

Permalink
fix: revert stalledDay logic
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Mar 11, 2020
1 parent eaf40af commit c5a2e22
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/delete-github-branches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ export const deleteGitHubBranches = async (options: deleteGitHubBranchesOptions)
// The branch is stalled day is later than options.stalledDays
// Today - lastPushedDate
const diffDays = dayjs().diff(branch.lastPushedDate, "day");
if (diffDays <= stalledDays) {
// if diffDays is 10 and stalledDays is 0, delete it
// if diffDays is 10 and stalledDays is 9, delete it
// if diffDays is 10 and stalledDays is 10, delete it
// if diffDays is 10 and stalledDays is 11, does not delete it
if (diffDays < stalledDays) {
results.push({
branchName: branch.branchName,
deleted: false,
Expand Down

0 comments on commit c5a2e22

Please sign in to comment.