From 89d4807c767335d95dd9e9f4b41f9f36f1f210fd Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Fri, 8 Mar 2019 17:23:43 +0100 Subject: [PATCH] fix: use HEAD not master for subDirectory links --- lib/workers/pr/pr-body.js | 2 +- test/workers/pr/__snapshots__/index.spec.js.snap | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/workers/pr/pr-body.js b/lib/workers/pr/pr-body.js index ca7a990fba..3a2a25e856 100644 --- a/lib/workers/pr/pr-body.js +++ b/lib/workers/pr/pr-body.js @@ -49,7 +49,7 @@ async function getPrBody(config) { if (sourceDirectory) { fullUrl = sourceUrl.replace(/\/?$/, '/') + - 'tree/master/' + + 'tree/HEAD/' + sourceDirectory.replace('^/?/', ''); } references.push(`[source](${fullUrl})`); diff --git a/test/workers/pr/__snapshots__/index.spec.js.snap b/test/workers/pr/__snapshots__/index.spec.js.snap index 2bce27a1db..f99be39f2e 100644 --- a/test/workers/pr/__snapshots__/index.spec.js.snap +++ b/test/workers/pr/__snapshots__/index.spec.js.snap @@ -32,7 +32,7 @@ Array [ | Package | Type | Update | Change | References | |---|---|---|---|---| -| dummy | devDependencies | pin | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/master/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) | +| dummy | devDependencies | pin | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/HEAD/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) | :pushpin: **Important**: Renovate will wait until you have merged this Pin PR before creating any *upgrade* PRs for the affected packages. Add the preset \`:preserveSemverRanges\` your config if you instead don't wish to pin dependencies. @@ -78,7 +78,7 @@ Array [ | Package | Type | Update | Change | References | |---|---|---|---|---| -| dummy | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/master/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) | +| dummy | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/HEAD/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) | --- @@ -122,7 +122,7 @@ Array [ | Package | Type | Update | Change | References | |---|---|---|---|---| -| dummy | devDependencies | lockFileMaintenance | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/master/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) | +| dummy | devDependencies | lockFileMaintenance | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/HEAD/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) | | a | | | \`aaaaaaa\` | | | b | | pin | \`some_new_value@bbbbbbb\` | | | c | | | | | @@ -183,7 +183,7 @@ Array [ | Package | Type | Update | Change | References | |---|---|---|---|---| -| dummy | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/master/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) | +| dummy | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/HEAD/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) | --- @@ -225,7 +225,7 @@ Object { | Package | Type | Update | Change | References | |---|---|---|---|---| -| dummy | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/master/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) | +| dummy | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/HEAD/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) | --- @@ -267,7 +267,7 @@ Object { | Package | Type | Update | Change | References | |---|---|---|---|---| -| dummy | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/master/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) | +| dummy | devDependencies | minor | \`1.0.0\` -> \`1.1.0\` | [homepage](https://dummy.com), [source](https://github.com/renovateapp/dummy/tree/HEAD/packages/a), [changelog](https://github.com/renovateapp/dummy/changelog.md) | --- -- GitLab