Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: patch grouping when separateMinorPatch=false (#9746)
Closes #9744
  • Loading branch information
rarkins committed Apr 27, 2021
1 parent 3d29ce3 commit bafb55d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/workers/repository/updates/branch-name.spec.ts
Expand Up @@ -67,6 +67,7 @@ describe(getName(), () => {
groupSlug: 'some group slug',
updateType: 'patch',
separateMajorMinor: true,
separateMinorPatch: true,
newMajor: 2,
group: {},
};
Expand Down
2 changes: 1 addition & 1 deletion lib/workers/repository/updates/branch-name.ts
Expand Up @@ -41,7 +41,7 @@ export function generateBranchName(update: RenovateConfig): void {
update.groupSlug = `major-${update.groupSlug}`;
}
}
if (update.updateType === 'patch') {
if (update.updateType === 'patch' && update.separateMinorPatch) {
update.groupSlug = `patch-${update.groupSlug}`;
}
update.branchTopic = update.group.branchTopic || update.branchTopic;
Expand Down
1 change: 1 addition & 0 deletions lib/workers/repository/updates/generate.spec.ts
Expand Up @@ -502,6 +502,7 @@ describe(getName(), () => {
newValue: '0.6.0',
isGroup: true,
separateMajorMinor: true,
separateMinorPatch: true,
updateType: 'patch' as UpdateType,
fileReplacePosition: 0,
},
Expand Down
5 changes: 4 additions & 1 deletion lib/workers/repository/updates/generate.ts
Expand Up @@ -221,7 +221,10 @@ export function generateBranchConfig(
upgrade.updateType === 'minor' && upgrade.separateMinorPatch
? ' (minor)'
: '';
upgrade.prTitle += upgrade.updateType === 'patch' ? ' (patch)' : '';
upgrade.prTitle +=
upgrade.updateType === 'patch' && upgrade.separateMinorPatch
? ' (patch)'
: '';
}
// Compile again to allow for nested templates
upgrade.prTitle = template.compile(upgrade.prTitle, upgrade);
Expand Down

0 comments on commit bafb55d

Please sign in to comment.