diff --git a/lib/config/templates/group-pr-body.hbs b/lib/config/templates/group-pr-body.hbs index 9ba59af4547038fda02e54754c490f8bed68f3d5..a8896cb3c47eb8560c9cd75f22d45f0816c6f3fb 100644 --- a/lib/config/templates/group-pr-body.hbs +++ b/lib/config/templates/group-pr-body.hbs @@ -7,10 +7,11 @@ This {{#if isGitHub}}Pull{{else}}Merge{{/if}} Request renovates the package grou ### Commits {{#each upgrades as |upgrade|}} +{{#if upgrade.releases.length}} <details> <summary>{{upgrade.githubName}}</summary> - {{#each upgrade.releases as |release|}} + #### {{release.version}} {{#each release.commits as |commit|}} - [`{{commit.shortSha}}`]({{commit.url}}){{commit.message}} @@ -18,9 +19,9 @@ This {{#if isGitHub}}Pull{{else}}Merge{{/if}} Request renovates the package grou {{/each}} </details> +{{/if}} {{/each}} -<br /> <br /> This {{#if isGitHub}}PR{{else}}MR{{/if}} has been generated by [Renovate Bot](https://keylocation.sg/our-tech/renovate). diff --git a/lib/config/templates/pr-body.hbs b/lib/config/templates/pr-body.hbs index b6781c332cc230b9fe409be1e78d8d790000631b..d87b43ba52984e50aba80d155bbd17d09211d890 100644 --- a/lib/config/templates/pr-body.hbs +++ b/lib/config/templates/pr-body.hbs @@ -1,4 +1,5 @@ This {{#if isGitHub}}Pull{{else}}Merge{{/if}} Request updates dependency [{{depName}}]({{repositoryUrl}}) from version `{{currentVersion}}` to `{{newVersion}}` +{{#if releases.length}} ### Commits @@ -13,8 +14,7 @@ This {{#if isGitHub}}Pull{{else}}Merge{{/if}} Request updates dependency [{{depN {{/each}} </details> - -<br /> +{{/if}} <br /> This {{#if isGitHub}}PR{{else}}MR{{/if}} has been generated by [Renovate Bot](https://keylocation.sg/our-tech/renovate). diff --git a/test/workers/__snapshots__/pr.spec.js.snap b/test/workers/__snapshots__/pr.spec.js.snap new file mode 100644 index 0000000000000000000000000000000000000000..fddec193f4506803d6f0f30a5ebdd0b9ded18cf7 --- /dev/null +++ b/test/workers/__snapshots__/pr.spec.js.snap @@ -0,0 +1,3 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`workers/pr ensurePr(upgrades) should return unmodified existing PR 1`] = `Array []`; diff --git a/test/workers/pr.spec.js b/test/workers/pr.spec.js index 23429b2d646ab43e77d585ebaa29a84f3711bdf3..07674d84940e500f60d70a1adfaad17c2c519889 100644 --- a/test/workers/pr.spec.js +++ b/test/workers/pr.spec.js @@ -99,8 +99,6 @@ describe('workers/pr', () => { - [\`abcdefg\`](https://github.com/renovateapp/dummy/commit/abcdefghijklmnopqrstuvwxyz)foo [#3](https://github.com/renovateapp/dummy/issues/3) </details> - -<br /> <br /> This PR has been generated by [Renovate Bot](https://keylocation.sg/our-tech/renovate).`, @@ -191,6 +189,7 @@ This PR has been generated by [Renovate Bot](https://keylocation.sg/our-tech/ren config.api.getBranchPr = jest.fn(() => existingPr); config.api.updatePr = jest.fn(); const pr = await prWorker.ensurePr([config]); + expect(config.api.updatePr.mock.calls).toMatchSnapshot(); expect(config.api.updatePr.mock.calls.length).toBe(0); expect(pr).toMatchObject(existingPr); });