Skip to content

Commit

Permalink
delete should happen regardless if there are tickets associated (#1240)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhuang822 authored Aug 5, 2024
1 parent b62e20c commit 73d715e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/stale-branches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ export async function run(): Promise<void> {

//Delete expired branches
if (commitAge > validInputs.daysBeforeDelete && branchComparison.save === false) {
if (!validInputs.dryRun) {
await deleteBranch(branchToCheck.branchName)
outputDeletes.push(branchToCheck.branchName)
} else {
core.info(`Dry Run: Branch would be deleted: ${branchToCheck.branchName}`)
}
for (const issueToDelete of filteredIssue) {
if (issueToDelete.issueTitle === issueTitleString) {
if (!validInputs.dryRun) {
await deleteBranch(branchToCheck.branchName)
} else {
core.info(`Dry Run: Branch would be deleted: ${branchToCheck.branchName}`)
}
closeIssueWrappedLogs(issueToDelete.issueNumber, validInputs, branchToCheck.branchName)
outputDeletes.push(branchToCheck.branchName)
}
}
}
Expand Down

0 comments on commit 73d715e

Please sign in to comment.