Skip to content

Commit

Permalink
use new fields where v is prepended manually
Browse files Browse the repository at this point in the history
  • Loading branch information
hasanwhitesource committed Aug 6, 2022
1 parent 8ca03fb commit ae03414
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/config/options/index.ts
Expand Up @@ -1358,7 +1358,7 @@ const options: RenovateOptions[] = [
branchTopic: '{{{depNameSanitized}}}-replacement',
commitMessageAction: 'Replace',
commitMessageExtra:
'with {{newName}} {{#if isMajor}}v{{{newMajor}}}{{else}}{{#if isSingleVersion}}v{{{newVersion}}}{{else}}{{{newValue}}}{{/if}}{{/if}}',
'with {{newName}} {{#if isMajor}}{{{prettyNewMajor}}}{{else}}{{#if isSingleVersion}}{{{prettyNewVersion}}}{{else}}{{{newValue}}}{{/if}}{{/if}}',
prBodyNotes: [
'This is a special PR that replaces `{{{depNameSanitized}}}` with the community suggested minimal stable replacement version.',
],
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/datasource/docker/index.ts
Expand Up @@ -338,7 +338,7 @@ export function isECRMaxResultsError(err: HttpError): boolean {
export const defaultConfig = {
commitMessageTopic: '{{{depName}}} Docker tag',
commitMessageExtra:
'to v{{#if isMajor}}{{{newMajor}}}{{else}}{{{newVersion}}}{{/if}}',
'to {{#if isMajor}}{{{prettyNewMajor}}}{{else}}{{{prettyNewVersion}}}{{/if}}',
digest: {
branchTopic: '{{{depNameSanitized}}}-{{{currentValue}}}',
commitMessageExtra: 'to {{newDigestShort}}',
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/manager/buildkite/index.ts
Expand Up @@ -7,7 +7,7 @@ export const defaultConfig = {
fileMatch: ['buildkite\\.ya?ml', '\\.buildkite/.+\\.ya?ml$'],
commitMessageTopic: 'buildkite plugin {{depName}}',
commitMessageExtra:
'to {{#if isMajor}}v{{{newMajor}}}{{else}}{{{newValue}}}{{/if}}',
'to {{#if isMajor}}{{{prettyNewMajor}}}{{else}}{{{newValue}}}{{/if}}',
};

export const supportedDatasources = [GithubTagsDatasource.id];
30 changes: 15 additions & 15 deletions lib/workers/repository/updates/generate.spec.ts
Expand Up @@ -136,7 +136,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '5.1.2',
newVersion: '5.1.2',
Expand All @@ -156,7 +156,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '5.1.2',
newVersion: '5.1.2',
Expand All @@ -177,7 +177,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '5.1.2',
newVersion: '5.1.2',
Expand Down Expand Up @@ -208,7 +208,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '5.1.2',
newVersion: '5.1.2',
Expand All @@ -222,7 +222,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '5.2.0',
newVersion: '5.2.0',
Expand All @@ -244,7 +244,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '5.1.2',
newVersion: '5.1.2',
Expand All @@ -260,7 +260,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '1.1.0',
newVersion: '1.1.0',
Expand All @@ -287,7 +287,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '^6.0',
newVersion: '6.0.3',
Expand All @@ -303,7 +303,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '^6.0',
newVersion: '6.0.1',
Expand All @@ -330,7 +330,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '^6.0.1',
newVersion: '6.0.2',
Expand All @@ -346,7 +346,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '^6.0.0',
newVersion: '6.0.2',
Expand All @@ -373,7 +373,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
isDigest: true,
currentDigest: 'abcdefghijklmnopqrstuvwxyz',
newDigest: '123abcdefghijklmnopqrstuvwxyz',
Expand All @@ -389,7 +389,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: 'zzzzzzzzzz',
group: {
Expand Down Expand Up @@ -430,7 +430,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '>= 5.1.2',
newVersion: '5.1.2',
Expand All @@ -446,7 +446,7 @@ describe('workers/repository/updates/generate', () => {
branchName: 'some-branch',
prTitle: 'some-title',
commitMessageExtra:
'to {{#if isMajor}}v{{newMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
'to {{#if isMajor}}{{prettyNewMajor}}{{else}}{{#unless isRange}}v{{/unless}}{{newValue}}{{/if}}',
foo: 1,
newValue: '^5,1,2',
newVersion: '5.1.2',
Expand Down

0 comments on commit ae03414

Please sign in to comment.