From 13f09b9f36afdb48202d7913df77927a19631946 Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Thu, 5 Jul 2018 18:21:43 +0200 Subject: [PATCH] refactor: simplify patch branch name --- lib/config/definitions.js | 7 +++---- .../repository/updates/__snapshots__/flatten.spec.js.snap | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/config/definitions.js b/lib/config/definitions.js index b15de71a5a..b8fe8ab02d 100644 --- a/lib/config/definitions.js +++ b/lib/config/definitions.js @@ -545,9 +545,7 @@ const options = [ 'Configuration to apply when an update type is patch. Only applies if `separateMinorPatch` is set to true', stage: 'package', type: 'json', - default: { - branchTopic: '{{{depNameSanitized}}}-{{{newMajor}}}.{{{newMinor}}}.x', - }, + default: {}, cli: false, mergeable: true, }, @@ -702,7 +700,8 @@ const options = [ name: 'branchTopic', description: 'Branch topic', type: 'string', - default: '{{{depNameSanitized}}}-{{{newMajor}}}.x', + default: + '{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x', cli: false, }, { diff --git a/test/workers/repository/updates/__snapshots__/flatten.spec.js.snap b/test/workers/repository/updates/__snapshots__/flatten.spec.js.snap index 31fba8dbab..b95e7af35d 100644 --- a/test/workers/repository/updates/__snapshots__/flatten.spec.js.snap +++ b/test/workers/repository/updates/__snapshots__/flatten.spec.js.snap @@ -9,7 +9,7 @@ Array [ "automergeType": "pr", "branchName": "{{{branchPrefix}}}{{{managerBranchPrefix}}}{{{branchTopic}}}", "branchPrefix": "renovate/", - "branchTopic": "{{{depNameSanitized}}}-{{{newMajor}}}.x", + "branchTopic": "{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x", "bumpVersion": null, "commitBody": null, "commitMessage": "{{{commitMessagePrefix}}} {{{commitMessageAction}}} {{{commitMessageTopic}}} {{{commitMessageExtra}}} {{{commitMessageSuffix}}}", @@ -82,7 +82,7 @@ Array [ "automergeType": "pr", "branchName": "{{{branchPrefix}}}{{{managerBranchPrefix}}}{{{branchTopic}}}", "branchPrefix": "renovate/", - "branchTopic": "{{{depNameSanitized}}}-{{{newMajor}}}.x", + "branchTopic": "{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x", "bumpVersion": null, "commitBody": null, "commitMessage": "{{{commitMessagePrefix}}} {{{commitMessageAction}}} {{{commitMessageTopic}}} {{{commitMessageExtra}}} {{{commitMessageSuffix}}}", @@ -226,7 +226,7 @@ Array [ "automergeType": "pr", "branchName": "{{{branchPrefix}}}{{{managerBranchPrefix}}}{{{branchTopic}}}", "branchPrefix": "renovate/", - "branchTopic": "{{{depNameSanitized}}}-{{{newMajor}}}.x", + "branchTopic": "{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x", "bumpVersion": null, "commitBody": null, "commitMessage": "{{{commitMessagePrefix}}} {{{commitMessageAction}}} {{{commitMessageTopic}}} {{{commitMessageExtra}}} {{{commitMessageSuffix}}}",