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

fix: compile handlebars multiple times to catch nested templates

Closes #1652
parent 32288fce
No related merge requests found
......@@ -36,6 +36,9 @@ function branchifyUpgrades(config) {
logger.debug('Using regular branchName template');
upgrade.branchName = handlebars.compile(upgrade.branchName)(upgrade);
}
// Compile extra times in case of nested handlebars templates
upgrade.branchName = handlebars.compile(upgrade.branchName)(upgrade);
upgrade.branchName = handlebars.compile(upgrade.branchName)(upgrade);
branchUpgrades[upgrade.branchName] =
branchUpgrades[upgrade.branchName] || [];
branchUpgrades[upgrade.branchName] = [upgrade].concat(
......
......@@ -49,6 +49,9 @@ function generateBranchConfig(branchUpgrades) {
upgrade.baseBranches && upgrade.baseBranches.length > 1
? ' ({{baseBranch}})'
: '';
// Compile a few times to allow for nested handlebars templates
upgrade.prTitle = handlebars.compile(upgrade.prTitle)(upgrade);
upgrade.prTitle = handlebars.compile(upgrade.prTitle)(upgrade);
upgrade.prTitle = handlebars.compile(upgrade.prTitle)(upgrade);
if (upgrade.semanticCommits) {
logger.debug('Upgrade has semantic commits enabled');
......
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