diff --git a/lib/workers/repository/cleanup.js b/lib/workers/repository/cleanup.js index f2fdeabd8a6cfbe74bdabc5c799215cb94840107..58ee07637a545279fa264757fb2226ce186e8f78 100644 --- a/lib/workers/repository/cleanup.js +++ b/lib/workers/repository/cleanup.js @@ -3,10 +3,6 @@ module.exports = { }; async function pruneStaleBranches(config) { - // istanbul ignore if - if (config.baseBranches && config.baseBranches.length) { - return; - } // TODO: try/catch const { branchList } = config; logger.debug('Removing any stale branches'); @@ -46,7 +42,7 @@ async function pruneStaleBranches(config) { return; } for (const branchName of remainingBranches) { - logger.debug({ branch: branchName }, `Deleting orphan branch`); + logger.info({ branch: branchName }, `Deleting orphan branch`); const pr = await platform.findPr(branchName, null, 'open'); if (pr) { logger.info({ prNo: pr.number, prTitle: pr.title }, 'Autoclosing PR'); diff --git a/lib/workers/repository/index.js b/lib/workers/repository/index.js index a0cba552b69732f9ece55c8dc607f1203c5695be..69e57dab7856d70d0cd898a7921a01f775d96381 100644 --- a/lib/workers/repository/index.js +++ b/lib/workers/repository/index.js @@ -50,6 +50,8 @@ async function renovateRepository(repoConfig, token, loop = 1) { config.branches = config.branches.concat(res.branches); } } + // istanbul ignore next + config.branchList = config.branches.map(branch => branch.branchName); } else { config = await resolvePackageFiles(config); config = await determineUpdates(config);