From 1e90a544fc553810aaebb3e43d75dede73ceec01 Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Tue, 16 Feb 2021 12:31:10 +0100 Subject: [PATCH] refactor: hashed branch compilation --- lib/workers/repository/updates/branch-name.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/workers/repository/updates/branch-name.ts b/lib/workers/repository/updates/branch-name.ts index 6a0cc6f19c..2a19844c2c 100644 --- a/lib/workers/repository/updates/branch-name.ts +++ b/lib/workers/repository/updates/branch-name.ts @@ -57,13 +57,15 @@ export function generateBranchName(update: RenovateConfig): void { hashLength = MIN_HASH_LENGTH; } - const additionalBranchPrefix = update.additionalBranchPrefix - ? template.compile(String(update.additionalBranchPrefix), update) - : ''; + const additionalBranchPrefix = template.compile( + String(update.additionalBranchPrefix || ''), + update + ); - const branchTopic = update.branchTopic - ? template.compile(String(update.branchTopic), update) - : ''; + const branchTopic = template.compile( + String(update.branchTopic || ''), + update + ); let hashInput = additionalBranchPrefix + branchTopic;