Skip to content
Snippets Groups Projects
Commit 9064e0af authored by Rhys Arkins's avatar Rhys Arkins
Browse files

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
parent 47afbc38
No related merge requests found
...@@ -15,8 +15,10 @@ async function processRepo(config) { ...@@ -15,8 +15,10 @@ async function processRepo(config) {
for (const baseBranch of config.baseBranches) { for (const baseBranch of config.baseBranches) {
logger.debug(`baseBranch: ${baseBranch}`); logger.debug(`baseBranch: ${baseBranch}`);
const baseBranchConfig = mergeChildConfig(config, { baseBranch }); const baseBranchConfig = mergeChildConfig(config, { baseBranch });
baseBranchConfig.branchPrefix += `${baseBranch}-`; if (config.baseBranches.length > 1) {
baseBranchConfig.hasBaseBranches = true; baseBranchConfig.branchPrefix += `${baseBranch}-`;
baseBranchConfig.hasBaseBranches = true;
}
platform.setBaseBranch(baseBranch); platform.setBaseBranch(baseBranch);
const baseBranchRes = await extractAndUpdate(baseBranchConfig); const baseBranchRes = await extractAndUpdate(baseBranchConfig);
({ res } = baseBranchRes); ({ res } = baseBranchRes);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment