diff --git a/dist/index.js b/dist/index.js index a1906a6..fb2348f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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 {