From 9064e0af62cf593d30a82de3476a7e83e1104166 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Mon, 23 Jul 2018 16:40:30 +0200
Subject: [PATCH] fix(baseBranches): apply special branch and PR naming only
 when multiple

baseBranch will be applied in PR title and in branch name only if there are more than one.

Closes #2306
---
 lib/workers/repository/process/index.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/workers/repository/process/index.js b/lib/workers/repository/process/index.js
index 1e58037ca2..459d2c3d28 100644
--- a/lib/workers/repository/process/index.js
+++ b/lib/workers/repository/process/index.js
@@ -15,8 +15,10 @@ async function processRepo(config) {
     for (const baseBranch of config.baseBranches) {
       logger.debug(`baseBranch: ${baseBranch}`);
       const baseBranchConfig = mergeChildConfig(config, { baseBranch });
-      baseBranchConfig.branchPrefix += `${baseBranch}-`;
-      baseBranchConfig.hasBaseBranches = true;
+      if (config.baseBranches.length > 1) {
+        baseBranchConfig.branchPrefix += `${baseBranch}-`;
+        baseBranchConfig.hasBaseBranches = true;
+      }
       platform.setBaseBranch(baseBranch);
       const baseBranchRes = await extractAndUpdate(baseBranchConfig);
       ({ res } = baseBranchRes);
-- 
GitLab