Skip to content
Snippets Groups Projects
Unverified Commit bafb55dd authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

fix: patch grouping when separateMinorPatch=false (#9746)

Closes #9744
parent 3d29ce33
No related branches found
No related tags found
No related merge requests found
...@@ -67,6 +67,7 @@ describe(getName(), () => { ...@@ -67,6 +67,7 @@ describe(getName(), () => {
groupSlug: 'some group slug', groupSlug: 'some group slug',
updateType: 'patch', updateType: 'patch',
separateMajorMinor: true, separateMajorMinor: true,
separateMinorPatch: true,
newMajor: 2, newMajor: 2,
group: {}, group: {},
}; };
......
...@@ -41,7 +41,7 @@ export function generateBranchName(update: RenovateConfig): void { ...@@ -41,7 +41,7 @@ export function generateBranchName(update: RenovateConfig): void {
update.groupSlug = `major-${update.groupSlug}`; update.groupSlug = `major-${update.groupSlug}`;
} }
} }
if (update.updateType === 'patch') { if (update.updateType === 'patch' && update.separateMinorPatch) {
update.groupSlug = `patch-${update.groupSlug}`; update.groupSlug = `patch-${update.groupSlug}`;
} }
update.branchTopic = update.group.branchTopic || update.branchTopic; update.branchTopic = update.group.branchTopic || update.branchTopic;
......
...@@ -502,6 +502,7 @@ describe(getName(), () => { ...@@ -502,6 +502,7 @@ describe(getName(), () => {
newValue: '0.6.0', newValue: '0.6.0',
isGroup: true, isGroup: true,
separateMajorMinor: true, separateMajorMinor: true,
separateMinorPatch: true,
updateType: 'patch' as UpdateType, updateType: 'patch' as UpdateType,
fileReplacePosition: 0, fileReplacePosition: 0,
}, },
......
...@@ -221,7 +221,10 @@ export function generateBranchConfig( ...@@ -221,7 +221,10 @@ export function generateBranchConfig(
upgrade.updateType === 'minor' && upgrade.separateMinorPatch upgrade.updateType === 'minor' && upgrade.separateMinorPatch
? ' (minor)' ? ' (minor)'
: ''; : '';
upgrade.prTitle += upgrade.updateType === 'patch' ? ' (patch)' : ''; upgrade.prTitle +=
upgrade.updateType === 'patch' && upgrade.separateMinorPatch
? ' (patch)'
: '';
} }
// Compile again to allow for nested templates // Compile again to allow for nested templates
upgrade.prTitle = template.compile(upgrade.prTitle, upgrade); upgrade.prTitle = template.compile(upgrade.prTitle, upgrade);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment