diff --git a/lib/workers/pr/pr-body.js b/lib/workers/pr/pr-body.js
index ca7a990fba2be7748516934e13428e43fcc6330f..3a2a25e85686926b464763a1a3b709396c0d540a 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 2bce27a1dbf02910093bcd6598014589752cfdb4..f99be39f2ebfd4ca2957412001bf4ff0831845c6 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) |
 
 ---