From 27aa59f5bcfc0f431a42a05da757b1fa74d472cb Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Mon, 19 Nov 2018 07:18:13 +0100 Subject: [PATCH] fix(bazel): better PR change description --- lib/config/definitions.js | 8 +++----- lib/manager/bazel/extract.js | 1 + test/manager/bazel/__snapshots__/extract.spec.js.snap | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/config/definitions.js b/lib/config/definitions.js index 95c5c90e09..f035ad3588 100644 --- a/lib/config/definitions.js +++ b/lib/config/definitions.js @@ -955,11 +955,9 @@ const options = [ default: { rollbackPrs: false, fileMatch: ['(^|/)WORKSPACE$'], - major: { - prBodyDefinitions: { - Change: - '{{#if currentDigest}}digest -> `{{{newVersion}}}`{{else}}`{{{currentValue}}}` -> `{{{newValue}}}`{{/if}}', - }, + prBodyDefinitions: { + Change: + '{{#if currentDigestShort}}`{{{currentDigestShort}}}` -> {{#if isDigest}}`{{{newDigestShort}}}`{{else}}`{{{newVersion}}}`{{/if}}{{else}}`{{{currentValue}}}` -> `{{{newValue}}}`{{/if}}', }, }, mergeable: true, diff --git a/lib/manager/bazel/extract.js b/lib/manager/bazel/extract.js index d0862dda20..447f7a9d85 100644 --- a/lib/manager/bazel/extract.js +++ b/lib/manager/bazel/extract.js @@ -104,6 +104,7 @@ function extractPackageFile(content) { if (commit) { dep.currentValue = 'v0.0.0'; dep.currentDigest = commit; + dep.currentDigestShort = commit.substr(0, 7); dep.digestOneAndOnly = true; } deps.push(dep); diff --git a/test/manager/bazel/__snapshots__/extract.spec.js.snap b/test/manager/bazel/__snapshots__/extract.spec.js.snap index e0cf46256c..47fc70e412 100644 --- a/test/manager/bazel/__snapshots__/extract.spec.js.snap +++ b/test/manager/bazel/__snapshots__/extract.spec.js.snap @@ -17,6 +17,7 @@ Array [ }, Object { "currentDigest": "dec09d789f3dba190787f8b4454c7d3c936fed9e", + "currentDigestShort": "dec09d7", "currentValue": "v0.0.0", "def": "go_repository( name = \\"com_github_google_uuid\\", -- GitLab