From 3ec668225aa7f2de19bc7283b2ab1ad63435dd1e Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Sun, 2 Jul 2017 06:37:46 +0200 Subject: [PATCH] fix: use new config for pin.group.prTitle --- lib/workers/package/versions.js | 4 +- .../__snapshots__/versions.spec.js.snap | 48 ++++++++++++++----- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/lib/workers/package/versions.js b/lib/workers/package/versions.js index 13b630e6ab..731807f051 100644 --- a/lib/workers/package/versions.js +++ b/lib/workers/package/versions.js @@ -42,7 +42,9 @@ function determineUpgrades(npmDep, config) { newVersion: maxSatisfying, newVersionMajor: semver.major(maxSatisfying), groupName: 'Pin Dependencies', - groupPrTitle: '{{groupName}}', + group: { + prTitle: '{{groupName}}', + }, }; changeLogFromVersion = maxSatisfying; } diff --git a/test/workers/package/__snapshots__/versions.spec.js.snap b/test/workers/package/__snapshots__/versions.spec.js.snap index f77af0aa64..6fdbc4e39d 100644 --- a/test/workers/package/__snapshots__/versions.spec.js.snap +++ b/test/workers/package/__snapshots__/versions.spec.js.snap @@ -4,8 +4,10 @@ exports[`workers/package/versions .determineUpgrades(npmDep, config) disables ma Array [ Object { "automergeEnabled": true, + "group": Object { + "prTitle": "{{groupName}}", + }, "groupName": "Pin Dependencies", - "groupPrTitle": "{{groupName}}", "isPin": true, "newVersion": "0.4.4", "newVersionMajor": 0, @@ -50,8 +52,10 @@ Array [ }, Object { "automergeEnabled": true, + "group": Object { + "prTitle": "{{groupName}}", + }, "groupName": "Pin Dependencies", - "groupPrTitle": "{{groupName}}", "isPin": true, "newVersion": "0.9.7", "newVersionMajor": 0, @@ -64,8 +68,10 @@ exports[`workers/package/versions .determineUpgrades(npmDep, config) pins minor Array [ Object { "automergeEnabled": true, + "group": Object { + "prTitle": "{{groupName}}", + }, "groupName": "Pin Dependencies", - "groupPrTitle": "{{groupName}}", "isPin": true, "newVersion": "1.4.1", "newVersionMajor": 1, @@ -96,8 +102,10 @@ Array [ }, Object { "automergeEnabled": true, + "group": Object { + "prTitle": "{{groupName}}", + }, "groupName": "Pin Dependencies", - "groupPrTitle": "{{groupName}}", "isPin": true, "newVersion": "0.4.4", "newVersionMajor": 0, @@ -110,8 +118,10 @@ exports[`workers/package/versions .determineUpgrades(npmDep, config) returns onl Array [ Object { "automergeEnabled": true, + "group": Object { + "prTitle": "{{groupName}}", + }, "groupName": "Pin Dependencies", - "groupPrTitle": "{{groupName}}", "isPin": true, "newVersion": "0.4.4", "newVersionMajor": 0, @@ -133,8 +143,10 @@ exports[`workers/package/versions .determineUpgrades(npmDep, config) returns onl Array [ Object { "automergeEnabled": true, + "group": Object { + "prTitle": "{{groupName}}", + }, "groupName": "Pin Dependencies", - "groupPrTitle": "{{groupName}}", "isPin": true, "newVersion": "0.4.4", "newVersionMajor": 0, @@ -199,8 +211,10 @@ exports[`workers/package/versions .determineUpgrades(npmDep, config) supports fu Array [ Object { "automergeEnabled": true, + "group": Object { + "prTitle": "{{groupName}}", + }, "groupName": "Pin Dependencies", - "groupPrTitle": "{{groupName}}", "isPin": true, "newVersion": "2.0.3", "newVersionMajor": 2, @@ -245,8 +259,10 @@ Array [ }, Object { "automergeEnabled": true, + "group": Object { + "prTitle": "{{groupName}}", + }, "groupName": "Pin Dependencies", - "groupPrTitle": "{{groupName}}", "isPin": true, "newVersion": "0.4.4", "newVersionMajor": 0, @@ -277,8 +293,10 @@ Array [ }, Object { "automergeEnabled": true, + "group": Object { + "prTitle": "{{groupName}}", + }, "groupName": "Pin Dependencies", - "groupPrTitle": "{{groupName}}", "isPin": true, "newVersion": "0.4.4", "newVersionMajor": 0, @@ -315,8 +333,10 @@ Array [ }, Object { "automergeEnabled": true, + "group": Object { + "prTitle": "{{groupName}}", + }, "groupName": "Pin Dependencies", - "groupPrTitle": "{{groupName}}", "isPin": true, "newVersion": "1.3.0", "newVersionMajor": 1, @@ -378,8 +398,10 @@ Array [ }, Object { "automergeEnabled": true, + "group": Object { + "prTitle": "{{groupName}}", + }, "groupName": "Pin Dependencies", - "groupPrTitle": "{{groupName}}", "isPin": true, "newVersion": "1.0.1", "newVersionMajor": 1, @@ -481,8 +503,10 @@ Array [ }, Object { "automergeEnabled": true, + "group": Object { + "prTitle": "{{groupName}}", + }, "groupName": "Pin Dependencies", - "groupPrTitle": "{{groupName}}", "isPin": true, "newVersion": "1.3.0", "newVersionMajor": 1,