From 3d65e3a48e8d17fab0c440fee480ab839f4f2a64 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Mon, 5 Mar 2018 12:12:46 +0100
Subject: [PATCH] fix: disable branch pruning when multiple basebranches in use

---
 lib/workers/repository/cleanup.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/workers/repository/cleanup.js b/lib/workers/repository/cleanup.js
index e96707a959..f2fdeabd8a 100644
--- a/lib/workers/repository/cleanup.js
+++ b/lib/workers/repository/cleanup.js
@@ -3,6 +3,10 @@ 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');
-- 
GitLab