diff --git a/lib/workers/repository/onboarding/pr/pr-list.js b/lib/workers/repository/onboarding/pr/pr-list.js index 9f6feb088479369d95e5b5a4b42a98cc387a3bcf..26d44fe392d8cebdb38bc53f085bc8cba3dc4e16 100644 --- a/lib/workers/repository/onboarding/pr/pr-list.js +++ b/lib/workers/repository/onboarding/pr/pr-list.js @@ -10,12 +10,12 @@ function getPrList(config, branches) { } Pull Request`; prDesc += branches.length > 1 ? `s:\n\n` : `:\n\n`; - for (const [index, branch] of branches.entries()) { + for (const branch of branches) { const prTitleRe = /@([a-z]+\/[a-z]+)/; - prDesc += `${index + 1}. **${branch.prTitle.replace( + prDesc += `<details>\n<summary>${branch.prTitle.replace( prTitleRe, '@​$1' - )}**\n\n`; + )}</summary>\n\n`; if (branch.schedule && branch.schedule.length) { prDesc += ` - Schedule: ${JSON.stringify(branch.schedule)}\n`; } @@ -50,6 +50,7 @@ function getPrList(config, branches) { } } prDesc += '\n\n'; + prDesc += '</details>\n\n'; } return prDesc; } diff --git a/test/workers/repository/onboarding/pr/__snapshots__/pr-list.spec.js.snap b/test/workers/repository/onboarding/pr/__snapshots__/pr-list.spec.js.snap index 8b500c27c8b66581b242626953559299a8a4f356..a35d11bc93fbe7ca672f75d8cd2397a112576b08 100644 --- a/test/workers/repository/onboarding/pr/__snapshots__/pr-list.spec.js.snap +++ b/test/workers/repository/onboarding/pr/__snapshots__/pr-list.spec.js.snap @@ -14,19 +14,25 @@ exports[`workers/repository/onboarding/pr/pr-list getPrList() handles multiple 1 With your current configuration, Renovate will create 2 Pull Requests: -1. **Pin dependencies** +<details> +<summary>Pin dependencies</summary> - Branch name: \`renovate/pin-dependencies\` - Pins [a](https://a) in \`devDependencies\` to \`1.1.0\` - Pins b to \`1.5.3\` -2. **Update a to v2** +</details> + +<details> +<summary>Update a to v2</summary> - Branch name: \`renovate/a-2.x\` - Upgrades [a](https://a) in \`devDependencies\` from \`^1.0.0\` to \`2.0.1\` +</details> + " `; @@ -36,11 +42,14 @@ exports[`workers/repository/onboarding/pr/pr-list getPrList() has special lock f With your current configuration, Renovate will create 1 Pull Request: -1. **Lock file maintenance** +<details> +<summary>Lock file maintenance</summary> - Schedule: [\\"before 5am\\"] - Branch name: \`renovate/lock-file-maintenance\` - Regenerates lock file to use latest dependency versions +</details> + " `; diff --git a/test/workers/repository/onboarding/pr/index.spec.js b/test/workers/repository/onboarding/pr/index.spec.js index b14834830529d1bdde247d167d07356823bffec7..bcb0dd457b9012bddd27bf6278e772d897499028 100644 --- a/test/workers/repository/onboarding/pr/index.spec.js +++ b/test/workers/repository/onboarding/pr/index.spec.js @@ -19,6 +19,7 @@ describe('workers/repository/onboarding/pr', () => { }; packageFiles = { npm: [{ packageFile: 'package.json' }] }; branches = []; + platform.getPrBody = jest.fn(input => input); platform.createPr.mockReturnValue({}); }); let createPrBody;