From 146a30df797eb94d127fbb0052cc0f3e26cd4bad Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Thu, 8 Aug 2024 10:09:18 +0200 Subject: [PATCH] fix: don't delete tag while removing branches --- dist/create-release-branch-main.js | 3 --- src/create-release-branch.ts | 3 --- 2 files changed, 6 deletions(-) diff --git a/dist/create-release-branch-main.js b/dist/create-release-branch-main.js index 3cf8438..dd633f4 100644 --- a/dist/create-release-branch-main.js +++ b/dist/create-release-branch-main.js @@ -24881,10 +24881,7 @@ async function main(input) { if (branches.length >= input.dryRunHistorySize) { const toDelete = branches.slice(0, branches.length - input.dryRunHistorySize); toDelete.forEach(branch => { - const tag = branch.replace("release/dry-run/", ""); command_sh(`git push origin --delete ${branch}`, { cwd: repo }); - // Don't fail the entire workflow if the tag delete fails - command_sh(`git push origin --delete ${tag}`, { cwd: repo, check: false }); }); } } diff --git a/src/create-release-branch.ts b/src/create-release-branch.ts index ba35914..d184096 100644 --- a/src/create-release-branch.ts +++ b/src/create-release-branch.ts @@ -63,10 +63,7 @@ export async function main(input: Input) { if (branches.length >= input.dryRunHistorySize) { const toDelete = branches.slice(0, branches.length - input.dryRunHistorySize); toDelete.forEach(branch => { - const tag = branch.replace("release/dry-run/", ""); sh(`git push origin --delete ${branch}`, { cwd: repo }); - // Don't fail the entire workflow if the tag delete fails - sh(`git push origin --delete ${tag}`, { cwd: repo, check: false }); }); } }