refactor: hashed branch compilation

This commit is contained in:
Rhys Arkins 2021-02-16 12:31:10 +01:00
parent f72fe9f724
commit 1e90a544fc

View file

@ -57,13 +57,15 @@ export function generateBranchName(update: RenovateConfig): void {
hashLength = MIN_HASH_LENGTH; hashLength = MIN_HASH_LENGTH;
} }
const additionalBranchPrefix = update.additionalBranchPrefix const additionalBranchPrefix = template.compile(
? template.compile(String(update.additionalBranchPrefix), update) String(update.additionalBranchPrefix || ''),
: ''; update
);
const branchTopic = update.branchTopic const branchTopic = template.compile(
? template.compile(String(update.branchTopic), update) String(update.branchTopic || ''),
: ''; update
);
let hashInput = additionalBranchPrefix + branchTopic; let hashInput = additionalBranchPrefix + branchTopic;