diff --git a/lib/workers/repository/updates/generate.js b/lib/workers/repository/updates/generate.js index 92b9150ddf424e6402b6b963688b5b8ef3eca5c2..af10baaf9d20486ce25c35f11b132e4f83fde07f 100644 --- a/lib/workers/repository/updates/generate.js +++ b/lib/workers/repository/updates/generate.js @@ -13,22 +13,22 @@ function generateBranchConfig(branchUpgrades) { logger.debug(`hasGroupName: ${hasGroupName}`); // Use group settings only if multiple upgrades or lazy grouping is disabled const depNames = []; - const newValue = []; + const toVersions = []; branchUpgrades.forEach(upg => { if (!depNames.includes(upg.depName)) { depNames.push(upg.depName); } - if (!newValue.includes(upg.toVersion)) { - newValue.push(upg.toVersion); + if (!toVersions.includes(upg.toVersion)) { + toVersions.push(upg.toVersion); } }); const groupEligible = depNames.length > 1 || - newValue.length > 1 || + toVersions.length > 1 || branchUpgrades[0].lazyGrouping === false; if (branchUpgrades.length > 1 && !groupEligible) { // eslint-disable-next-line no-param-reassign - branchUpgrades[0].commitMessageExtra = `to v${newValue[0]}`; + branchUpgrades[0].commitMessageExtra = `to v${toVersions[0]}`; } logger.debug(`groupEligible: ${groupEligible}`); const useGroupSettings = hasGroupName && groupEligible; @@ -56,11 +56,11 @@ function generateBranchConfig(branchUpgrades) { (branchUpgrades[1].depName.startsWith('@types/') && branchUpgrades[1].depName.endsWith(branchUpgrades[0].depName))); // istanbul ignore else - if (newValue.length > 1 && !isTypesGroup) { - logger.debug({ newValue }); + if (toVersions.length > 1 && !isTypesGroup) { + logger.debug({ toVersions }); delete upgrade.commitMessageExtra; upgrade.recreateClosed = true; - } else if (semver.valid(newValue[0])) { + } else if (semver.valid(toVersions[0])) { upgrade.isRange = false; } // Use templates to generate strings