diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js index 9d5e799603fdb54441f16ebe1661d3e4a6f02f86..cac7713a42f1afdf10e472d952282a224877cb77 100644 --- a/lib/workers/branch/index.js +++ b/lib/workers/branch/index.js @@ -58,6 +58,9 @@ async function processBranch(branchConfig) { content += '\n\nIf this PR was closed by mistake or you changed your mind, you can simply reopen or rename it to reactivate Renovate for this dependency version.'; await platform.ensureComment(pr.number, subject, content); + if (await platform.branchExists(config.branchName)) { + await platform.deleteBranch(config.branchName); + } return 'already-existed'; } logger.debug('Checking if PR has been edited');