Skip to content

Commit

Permalink
refactor: hashed branch compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Feb 16, 2021
1 parent f72fe9f commit 1e90a54
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/workers/repository/updates/branch-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1e90a54

Please sign in to comment.