Skip to content

Commit

Permalink
FIX: not include deleteBrances to stalesBranches
Browse files Browse the repository at this point in the history
  • Loading branch information
sichoi42 committed Apr 22, 2024
1 parent 3112de8 commit fce34fb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,12 @@ function _run() {
const commitDateStr = branchInfo.data.commit.commit.committer.date;
if (commitDateStr) {
const branchDate = new Date(commitDateStr);
if (branchDate < staleDate) {
staleBranches.push(branch.name);
}
if (!branch.protected &&
branchDate < deleteDate &&
!staleBranches.includes(branch.name)) {
if (!branch.protected && branchDate < deleteDate) {
deleteBranches.push(branch.name);
}
if (!deleteBranches.includes(branch.name) && branchDate < staleDate) {
staleBranches.push(branch.name);
}
}
}
else {
Expand Down

0 comments on commit fce34fb

Please sign in to comment.