From 772bc176037e377369e94018f7d44eb19393736f Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Mon, 10 Dec 2018 05:59:28 +0100
Subject: [PATCH] refactor: repositoryUrl -> sourceUrl

---
 lib/datasource/github.js                       |  4 ++--
 lib/datasource/npm.js                          |  8 ++++----
 lib/datasource/nuget.js                        |  8 +++-----
 lib/datasource/packagist.js                    |  2 +-
 lib/datasource/pypi.js                         | 12 ++++++------
 lib/datasource/readme.md                       |  6 +++---
 lib/datasource/terraform.js                    |  4 ++--
 lib/manager/npm/extract/index.js               |  2 +-
 lib/manager/travis/package.js                  |  2 +-
 lib/workers/pr/changelog/index.js              |  4 ++--
 lib/workers/pr/changelog/source-github.js      | 10 +++++-----
 lib/workers/pr/index.js                        |  8 ++++----
 lib/workers/pr/pr-body.js                      |  6 +++---
 .../repository/onboarding/pr/pr-list.js        |  4 ++--
 lib/workers/repository/process/lookup/index.js |  6 +++---
 .../__snapshots__/github.spec.js.snap          |  4 ++--
 test/datasource/__snapshots__/npm.spec.js.snap | 18 +++++++++---------
 .../__snapshots__/nuget.spec.js.snap           |  2 +-
 .../__snapshots__/packagist.spec.js.snap       |  6 +++---
 .../datasource/__snapshots__/pypi.spec.js.snap |  6 +++---
 .../__snapshots__/terraform.spec.js.snap       |  2 +-
 test/datasource/nuget.spec.js                  |  2 +-
 .../extract/__snapshots__/index.spec.js.snap   | 14 +++++++-------
 .../travis/__snapshots__/package.spec.js.snap  |  2 +-
 test/workers/pr/changelog/index.spec.js        | 16 ++++++++--------
 test/workers/pr/index.spec.js                  |  2 +-
 .../repository/onboarding/pr/pr-list.spec.js   |  4 ++--
 .../lookup/__snapshots__/index.spec.js.snap    | 16 ++++++++--------
 .../repository/process/lookup/index.spec.js    |  2 +-
 29 files changed, 90 insertions(+), 92 deletions(-)

diff --git a/lib/datasource/github.js b/lib/datasource/github.js
index 7c52535800..82e350ff10 100644
--- a/lib/datasource/github.js
+++ b/lib/datasource/github.js
@@ -89,7 +89,7 @@ async function getDigest(config) {
  *  - Fetch all tags or releases (depending on configuration)
  *  - Filter for only tags that meet the version scheme definition of a version
  *  - Sanitize the versions if desired (e.g. strip out leading 'v')
- *  - Return a dependency object containing repositoryUrl string and releases array
+ *  - Return a dependency object containing sourceUrl string and releases array
  */
 
 async function getPkgReleases(purl, config) {
@@ -132,7 +132,7 @@ async function getPkgReleases(purl, config) {
   // Return a sorted list of valid Versions
   versions = versions.filter(isVersion).sort(sortVersions);
   const dependency = {
-    repositoryUrl: 'https://github.com/' + repo,
+    sourceUrl: 'https://github.com/' + repo,
   };
   dependency.releases = versions.map(version => ({
     version: options.sanitize === 'true' ? isVersion(version) : version,
diff --git a/lib/datasource/npm.js b/lib/datasource/npm.js
index 0f43ce68e6..4bb14038dc 100644
--- a/lib/datasource/npm.js
+++ b/lib/datasource/npm.js
@@ -37,7 +37,7 @@ function resetCache() {
   resetMemCache();
 }
 
-// This is a manual list of changelog URLs for dependencies that don't publish to repositoryUrl
+// This is a manual list of changelog URLs for dependencies that don't publish to sourceUrl
 const changelogUrls = {
   firebase: 'https://firebase.google.com/support/release-notes/js',
   'flow-bin': 'https://github.com/facebook/flow/blob/master/Changelog.md',
@@ -290,7 +290,7 @@ async function getDependency(name, maxRetries = 5) {
     res.homepage = res.homepage || latestVersion.homepage;
 
     // Determine repository URL
-    let repositoryUrl;
+    let sourceUrl;
 
     if (res.repository && res.repository.url) {
       const extraBaseUrls = [];
@@ -309,7 +309,7 @@ async function getDependency(name, maxRetries = 5) {
           .slice(0, 5)
           .join('/');
       }
-      repositoryUrl = parse(res.repository.url, {
+      sourceUrl = parse(res.repository.url, {
         extraBaseUrls,
       });
     }
@@ -321,7 +321,7 @@ async function getDependency(name, maxRetries = 5) {
       name: res.name,
       homepage: res.homepage,
       latestVersion: res['dist-tags'].latest,
-      repositoryUrl,
+      sourceUrl,
       versions: {},
       'dist-tags': res['dist-tags'],
       'renovate-config': latestVersion['renovate-config'],
diff --git a/lib/datasource/nuget.js b/lib/datasource/nuget.js
index eb6ebba97a..d295e8cad1 100644
--- a/lib/datasource/nuget.js
+++ b/lib/datasource/nuget.js
@@ -29,11 +29,9 @@ async function getPkgReleases(purl) {
       const result = await got(url);
       const nuspec = xmlParser.parse(result.body, { ignoreAttributes: false });
       if (nuspec) {
-        const repositoryUrl = parse(
-          nuspec.package.metadata.repository['@_url']
-        );
-        if (repositoryUrl) {
-          dep.repositoryUrl = repositoryUrl;
+        const sourceUrl = parse(nuspec.package.metadata.repository['@_url']);
+        if (sourceUrl) {
+          dep.sourceUrl = sourceUrl;
         }
       }
     } catch (err) /* istanbul ignore next */ {
diff --git a/lib/datasource/packagist.js b/lib/datasource/packagist.js
index 801e006a09..3920579078 100644
--- a/lib/datasource/packagist.js
+++ b/lib/datasource/packagist.js
@@ -110,7 +110,7 @@ function extractDepReleases(versions) {
       const release = versions[version];
       dep.homepage = release.homepage || dep.homepage;
       if (release.source && release.source.url) {
-        dep.repositoryUrl = parse(release.source.url) || release.source.url;
+        dep.sourceUrl = parse(release.source.url) || release.source.url;
       }
       return {
         version: version.replace(/^v/, ''),
diff --git a/lib/datasource/pypi.js b/lib/datasource/pypi.js
index 59e208f7b8..6f33f7a398 100644
--- a/lib/datasource/pypi.js
+++ b/lib/datasource/pypi.js
@@ -11,7 +11,7 @@ function normalizeName(input) {
   return input.toLowerCase().replace(/(-|\.)/g, '_');
 }
 
-// This is a manual list of changelog URLs for dependencies that don't publish to repositoryUrl
+// This is a manual list of changelog URLs for dependencies that don't publish to sourceUrl
 // Make these lower case
 const changelogUrls = {
   'pytest-django':
@@ -90,7 +90,7 @@ async function getDependency(depName, hostUrl, compatibility) {
     }
     if (dep.info && dep.info.home_page) {
       if (dep.info.home_page.match(/^https?:\/\/github.com/)) {
-        dependency.repositoryUrl = dep.info.home_page.replace(
+        dependency.sourceUrl = dep.info.home_page.replace(
           'http://',
           'https://'
         );
@@ -102,8 +102,8 @@ async function getDependency(depName, hostUrl, compatibility) {
       mkdocs: 'https://github.com/mkdocs/mkdocs',
       pillow: 'https://github.com/python-pillow/Pillow',
     };
-    dependency.repositoryUrl =
-      dependency.repositoryUrl || manualRepositories[depName.toLowerCase()];
+    dependency.sourceUrl =
+      dependency.sourceUrl || manualRepositories[depName.toLowerCase()];
     dependency.releases = [];
     if (dep.releases) {
       const versions = compatibleVersions(dep.releases, compatibility);
@@ -117,10 +117,10 @@ async function getDependency(depName, hostUrl, compatibility) {
       dependency.changelogUrl =
         changelogUrls[depName.toLowerCase()] || dependency.changelogUrl;
       if (
-        !dependency.repositoryUrl &&
+        !dependency.sourceUrl &&
         dependency.changelogUrl.startsWith('https://github.com/')
       ) {
-        dependency.repositoryUrl = dependency.changelogUrl
+        dependency.sourceUrl = dependency.changelogUrl
           .split('/')
           .slice(0, 5)
           .join('/');
diff --git a/lib/datasource/readme.md b/lib/datasource/readme.md
index 90b986d5ad..8eb5c24029 100644
--- a/lib/datasource/readme.md
+++ b/lib/datasource/readme.md
@@ -17,9 +17,9 @@ In the simplest case, the datasource only needs to pay attention to `purl.fullna
 
 - `releases`: an array of strings of matched versions. This is the only mandatory field.
 - `deprecationMessage`: a string description of the package's deprecation notice, if applicable
-- `repositoryUrl`: a HTTP URL pointing to the source code (e.g. on GitHub)
-- `homepage`: a HTTP URL for the package's homepage. Ideally should be empty if the homepage and repositoryUrl are the same
-- `changelogUrl`: a URL pointing to the package's Changelog (could be a markdown file, for example). If not present then Renovate will search the `repositoryUrl` for a changelog file.
+- `sourceUrl`: a HTTP URL pointing to the source code (e.g. on GitHub)
+- `homepage`: a HTTP URL for the package's homepage. Ideally should be empty if the homepage and sourceUrl are the same
+- `changelogUrl`: a URL pointing to the package's Changelog (could be a markdown file, for example). If not present then Renovate will search the `sourceUrl` for a changelog file.
 - `tags`: an object mapping tag -> version, e.g. `tags: { latest: '3.0.0' }`. This is only used by the `followTags` function.
 
 ### getDigest
diff --git a/lib/datasource/terraform.js b/lib/datasource/terraform.js
index 2bf9857282..61df4ad6d3 100644
--- a/lib/datasource/terraform.js
+++ b/lib/datasource/terraform.js
@@ -10,7 +10,7 @@ module.exports = {
  * terraform.getPkgReleases
  *
  * This function will fetch a package from the specified Terraform registry and return all semver versions.
- *  - `repositoryUrl` is supported of "source" field is set
+ *  - `sourceUrl` is supported of "source" field is set
  *  - `homepage` is set to the Terraform registry's page if it's on the official main registry
  */
 
@@ -40,7 +40,7 @@ async function getPkgReleases(purl) {
       versions: {},
     };
     if (res.source) {
-      dep.repositoryUrl = parse(res.source);
+      dep.sourceUrl = parse(res.source);
     }
     dep.releases = res.versions
       .filter(v => isVersion(v))
diff --git a/lib/manager/npm/extract/index.js b/lib/manager/npm/extract/index.js
index 73ca56f19f..8d087fa4f0 100644
--- a/lib/manager/npm/extract/index.js
+++ b/lib/manager/npm/extract/index.js
@@ -214,7 +214,7 @@ async function extractPackageFile(content, fileName, config) {
       return dep;
     }
     dep.githubRepo = githubOwnerRepo;
-    dep.repositoryUrl = `https://github.com/${githubOwnerRepo}`;
+    dep.sourceUrl = `https://github.com/${githubOwnerRepo}`;
     dep.gitRef = true;
     return dep;
   }
diff --git a/lib/manager/travis/package.js b/lib/manager/travis/package.js
index 6e9b53199b..fca71891d2 100644
--- a/lib/manager/travis/package.js
+++ b/lib/manager/travis/package.js
@@ -56,7 +56,7 @@ async function getPackageUpdates(config) {
       newValue,
       newMajor,
       isRange: true,
-      repositoryUrl: 'https://github.com/nodejs/node',
+      sourceUrl: 'https://github.com/nodejs/node',
     },
   ];
 }
diff --git a/lib/workers/pr/changelog/index.js b/lib/workers/pr/changelog/index.js
index bd2f537db1..f9f9b618fc 100644
--- a/lib/workers/pr/changelog/index.js
+++ b/lib/workers/pr/changelog/index.js
@@ -7,8 +7,8 @@ module.exports = {
 };
 
 async function getChangeLogJSON(args) {
-  const { repositoryUrl, versionScheme, fromVersion, toVersion } = args;
-  if (!repositoryUrl) {
+  const { sourceUrl, versionScheme, fromVersion, toVersion } = args;
+  if (!sourceUrl) {
     return null;
   }
   // releases is too noisy in the logs
diff --git a/lib/workers/pr/changelog/source-github.js b/lib/workers/pr/changelog/source-github.js
index 43b63e1638..54bb61aa67 100644
--- a/lib/workers/pr/changelog/source-github.js
+++ b/lib/workers/pr/changelog/source-github.js
@@ -41,19 +41,19 @@ async function getChangeLogJSON({
   versionScheme,
   fromVersion,
   toVersion,
-  repositoryUrl,
+  sourceUrl,
   releases,
   depName,
   manager,
 }) {
-  if (repositoryUrl === 'https://github.com/DefinitelyTyped/DefinitelyTyped') {
+  if (sourceUrl === 'https://github.com/DefinitelyTyped/DefinitelyTyped') {
     logger.debug('No release notes for @types');
     return null;
   }
   const { isVersion, equals, isGreaterThan, sortVersions } = versioning.get(
     versionScheme
   );
-  const { protocol, host, pathname } = URL.parse(repositoryUrl);
+  const { protocol, host, pathname } = URL.parse(sourceUrl);
   const githubBaseURL = `${protocol}//${host}/`;
   const config = hostRules.find({
     platform: 'github',
@@ -65,7 +65,7 @@ async function getChangeLogJSON({
   }
   const repository = pathname.slice(1).replace(/\/$/, '');
   if (repository.split('/').length !== 2) {
-    logger.info({ repositoryUrl }, 'Invalid github URL found');
+    logger.info({ sourceUrl }, 'Invalid github URL found');
     return null;
   }
   if (!(releases && releases.length)) {
@@ -146,7 +146,7 @@ async function getChangeLogJSON({
     project: {
       githubBaseURL,
       github: repository,
-      repository: repositoryUrl,
+      repository: sourceUrl,
     },
     versions: changelogReleases,
   };
diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js
index 7b1591648a..96794263e0 100644
--- a/lib/workers/pr/index.js
+++ b/lib/workers/pr/index.js
@@ -121,7 +121,7 @@ async function ensurePr(prConfig) {
       continue; // eslint-disable-line no-continue
     }
     processedUpgrades.push(upgradeKey);
-    upgrade.hasUrls = !!(upgrade.repositoryUrl || upgrade.homepage);
+    upgrade.hasUrls = !!(upgrade.sourceUrl || upgrade.homepage);
 
     const logJSON = await changelogHelper.getChangeLogJSON({
       manager: upgrade.manager,
@@ -130,7 +130,7 @@ async function ensurePr(prConfig) {
       depName: upgrade.depName,
       fromVersion: upgrade.fromVersion,
       toVersion: upgrade.toVersion,
-      repositoryUrl: upgrade.repositoryUrl,
+      sourceUrl: upgrade.sourceUrl,
       releases: upgrade.releases,
     });
 
@@ -160,14 +160,14 @@ async function ensurePr(prConfig) {
   const releaseNoteRepos = [];
   for (const upgrade of config.upgrades) {
     if (upgrade.hasReleaseNotes) {
-      if (releaseNoteRepos.includes(upgrade.repositoryUrl)) {
+      if (releaseNoteRepos.includes(upgrade.sourceUrl)) {
         logger.debug(
           { depName: upgrade.depName },
           'Removing duplicate release notes'
         );
         upgrade.hasReleaseNotes = false;
       } else {
-        releaseNoteRepos.push(upgrade.repositoryUrl);
+        releaseNoteRepos.push(upgrade.sourceUrl);
       }
     }
   }
diff --git a/lib/workers/pr/pr-body.js b/lib/workers/pr/pr-body.js
index 723fcd08cd..9fc335b789 100644
--- a/lib/workers/pr/pr-body.js
+++ b/lib/workers/pr/pr-body.js
@@ -37,13 +37,13 @@ function getNonEmptyColumns(definitions, rows) {
 async function getPrBody(config) {
   config.upgrades.forEach(upgrade => {
     /* eslint-disable no-param-reassign */
-    const { homepage, repositoryUrl, changelogUrl } = upgrade;
+    const { homepage, sourceUrl, changelogUrl } = upgrade;
     const references = [];
     if (homepage) {
       references.push(`[homepage](${homepage})`);
     }
-    if (repositoryUrl) {
-      references.push(`[source](${repositoryUrl})`);
+    if (sourceUrl) {
+      references.push(`[source](${sourceUrl})`);
     }
     if (changelogUrl) {
       references.push(`[changelog](${changelogUrl})`);
diff --git a/lib/workers/repository/onboarding/pr/pr-list.js b/lib/workers/repository/onboarding/pr/pr-list.js
index 2cd62de139..aabd0039fb 100644
--- a/lib/workers/repository/onboarding/pr/pr-list.js
+++ b/lib/workers/repository/onboarding/pr/pr-list.js
@@ -34,8 +34,8 @@ function getPrList(config, branches) {
         } else {
           text += '  - Upgrade ';
         }
-        if (upgrade.repositoryUrl) {
-          text += `[${upgrade.depName}](${upgrade.repositoryUrl})`;
+        if (upgrade.sourceUrl) {
+          text += `[${upgrade.depName}](${upgrade.sourceUrl})`;
         } else {
           text += upgrade.depName.replace(prTitleRe, '@&#8203;$1');
         }
diff --git a/lib/workers/repository/process/lookup/index.js b/lib/workers/repository/process/lookup/index.js
index 52f7802673..6797de2433 100644
--- a/lib/workers/repository/process/lookup/index.js
+++ b/lib/workers/repository/process/lookup/index.js
@@ -50,9 +50,9 @@ async function lookupUpdates(config) {
       logger.info({ dependency: depName }, 'Found deprecationMessage');
       res.deprecationMessage = dependency.deprecationMessage;
     }
-    res.repositoryUrl =
-      dependency.repositoryUrl && dependency.repositoryUrl.length
-        ? dependency.repositoryUrl
+    res.sourceUrl =
+      dependency.sourceUrl && dependency.sourceUrl.length
+        ? dependency.sourceUrl
         : null;
     res.homepage = dependency.homepage;
     res.changelogUrl = dependency.changelogUrl;
diff --git a/test/datasource/__snapshots__/github.spec.js.snap b/test/datasource/__snapshots__/github.spec.js.snap
index f3591d40bf..6bb33fe0ed 100644
--- a/test/datasource/__snapshots__/github.spec.js.snap
+++ b/test/datasource/__snapshots__/github.spec.js.snap
@@ -12,7 +12,7 @@ Object {
       "version": "1.1.0",
     },
   ],
-  "repositoryUrl": "https://github.com/some/dep",
+  "sourceUrl": "https://github.com/some/dep",
 }
 `;
 
@@ -28,6 +28,6 @@ Object {
       "version": "v1.1.0",
     },
   ],
-  "repositoryUrl": "https://github.com/some/dep",
+  "sourceUrl": "https://github.com/some/dep",
 }
 `;
diff --git a/test/datasource/__snapshots__/npm.spec.js.snap b/test/datasource/__snapshots__/npm.spec.js.snap
index c0e0d0ab67..a2243acfcc 100644
--- a/test/datasource/__snapshots__/npm.spec.js.snap
+++ b/test/datasource/__snapshots__/npm.spec.js.snap
@@ -23,7 +23,7 @@ Object {
     },
   ],
   "renovate-config": undefined,
-  "repositoryUrl": "https://github.com/renovateapp/dummy",
+  "sourceUrl": "https://github.com/renovateapp/dummy",
   "versions": Object {},
 }
 `;
@@ -51,7 +51,7 @@ Object {
     },
   ],
   "renovate-config": undefined,
-  "repositoryUrl": "https://github.com/renovateapp/dummy",
+  "sourceUrl": "https://github.com/renovateapp/dummy",
   "versions": Object {},
 }
 `;
@@ -77,7 +77,7 @@ Object {
     },
   ],
   "renovate-config": undefined,
-  "repositoryUrl": "https://github.com/renovateapp/dummy",
+  "sourceUrl": "https://github.com/renovateapp/dummy",
   "versions": Object {},
 }
 `;
@@ -101,7 +101,7 @@ Object {
       "version": "0.0.2",
     },
   ],
-  "repositoryUrl": "https://github.com/renovateapp/dummy",
+  "sourceUrl": "https://github.com/renovateapp/dummy",
   "tags": Object {
     "latest": "0.0.1",
   },
@@ -132,7 +132,7 @@ Object {
     },
   ],
   "renovate-config": undefined,
-  "repositoryUrl": "https://github.com/renovateapp/dummy",
+  "sourceUrl": "https://github.com/renovateapp/dummy",
   "versions": Object {},
 }
 `;
@@ -169,7 +169,7 @@ Marking the latest version of an npm package as deprecated results in the entire
     },
   ],
   "renovate-config": undefined,
-  "repositoryUrl": "https://github.com/renovateapp/dummy",
+  "sourceUrl": "https://github.com/renovateapp/dummy",
   "versions": Object {},
 }
 `;
@@ -211,7 +211,7 @@ Object {
     },
   ],
   "renovate-config": undefined,
-  "repositoryUrl": "https://github.com/renovateapp/dummy",
+  "sourceUrl": "https://github.com/renovateapp/dummy",
   "versions": Object {},
 }
 `;
@@ -239,7 +239,7 @@ Object {
     },
   ],
   "renovate-config": undefined,
-  "repositoryUrl": "https://github.com/renovateapp/dummy",
+  "sourceUrl": "https://github.com/renovateapp/dummy",
   "versions": Object {},
 }
 `;
@@ -267,7 +267,7 @@ Object {
     },
   ],
   "renovate-config": undefined,
-  "repositoryUrl": "https://github.com/renovateapp/dummy",
+  "sourceUrl": "https://github.com/renovateapp/dummy",
   "versions": Object {},
 }
 `;
diff --git a/test/datasource/__snapshots__/nuget.spec.js.snap b/test/datasource/__snapshots__/nuget.spec.js.snap
index b55175873a..b66c69bf67 100644
--- a/test/datasource/__snapshots__/nuget.spec.js.snap
+++ b/test/datasource/__snapshots__/nuget.spec.js.snap
@@ -110,6 +110,6 @@ Object {
       "version": "3.10.1",
     },
   ],
-  "repositoryUrl": "https://github.com/JamesNK/Newtonsoft.Json",
+  "sourceUrl": "https://github.com/JamesNK/Newtonsoft.Json",
 }
 `;
diff --git a/test/datasource/__snapshots__/packagist.spec.js.snap b/test/datasource/__snapshots__/packagist.spec.js.snap
index 134ad58b6a..c311a9a359 100644
--- a/test/datasource/__snapshots__/packagist.spec.js.snap
+++ b/test/datasource/__snapshots__/packagist.spec.js.snap
@@ -81,7 +81,7 @@ Object {
       "version": "2.5",
     },
   ],
-  "repositoryUrl": "https://github.com/drewm/mailchimp-api",
+  "sourceUrl": "https://github.com/drewm/mailchimp-api",
 }
 `;
 
@@ -226,7 +226,7 @@ Object {
       "version": "3.8.1",
     },
   ],
-  "repositoryUrl": "https://github.com/guzzle/guzzle",
+  "sourceUrl": "https://github.com/guzzle/guzzle",
 }
 `;
 
@@ -280,6 +280,6 @@ Object {
       "version": "1.5.1",
     },
   ],
-  "repositoryUrl": "https://plugins.svn.wordpress.org/1beyt/",
+  "sourceUrl": "https://plugins.svn.wordpress.org/1beyt/",
 }
 `;
diff --git a/test/datasource/__snapshots__/pypi.spec.js.snap b/test/datasource/__snapshots__/pypi.spec.js.snap
index b1c1ec3629..dbce0914d6 100644
--- a/test/datasource/__snapshots__/pypi.spec.js.snap
+++ b/test/datasource/__snapshots__/pypi.spec.js.snap
@@ -92,7 +92,7 @@ Object {
       "version": "0.1.7",
     },
   ],
-  "repositoryUrl": "https://github.com/Azure/azure-cli",
+  "sourceUrl": "https://github.com/Azure/azure-cli",
 }
 `;
 
@@ -112,7 +112,7 @@ Object {
       "version": "0.31.0",
     },
   ],
-  "repositoryUrl": undefined,
+  "sourceUrl": undefined,
 }
 `;
 
@@ -120,7 +120,7 @@ exports[`datasource/pypi getPkgReleases returns non-github home_page 1`] = `
 Object {
   "homepage": "https://microsoft.com",
   "releases": Array [],
-  "repositoryUrl": undefined,
+  "sourceUrl": undefined,
 }
 `;
 
diff --git a/test/datasource/__snapshots__/terraform.spec.js.snap b/test/datasource/__snapshots__/terraform.spec.js.snap
index f9cb5f5220..b71e351ecc 100644
--- a/test/datasource/__snapshots__/terraform.spec.js.snap
+++ b/test/datasource/__snapshots__/terraform.spec.js.snap
@@ -75,7 +75,7 @@ Object {
       "version": "0.4.0",
     },
   ],
-  "repositoryUrl": "https://github.com/hashicorp/terraform-aws-consul",
+  "sourceUrl": "https://github.com/hashicorp/terraform-aws-consul",
   "versions": Object {},
 }
 `;
diff --git a/test/datasource/nuget.spec.js b/test/datasource/nuget.spec.js
index dd67f5c20d..14a443663d 100644
--- a/test/datasource/nuget.spec.js
+++ b/test/datasource/nuget.spec.js
@@ -37,7 +37,7 @@ describe('datasource/nuget', () => {
       const res = await datasource.getPkgReleases('pkg:nuget/nunit');
       expect(res).not.toBeNull();
       expect(res).toMatchSnapshot();
-      expect(res.repositoryUrl).toBeDefined();
+      expect(res.sourceUrl).toBeDefined();
     });
   });
 });
diff --git a/test/manager/npm/extract/__snapshots__/index.spec.js.snap b/test/manager/npm/extract/__snapshots__/index.spec.js.snap
index ec03d6814d..0c4b6ada76 100644
--- a/test/manager/npm/extract/__snapshots__/index.spec.js.snap
+++ b/test/manager/npm/extract/__snapshots__/index.spec.js.snap
@@ -138,7 +138,7 @@ Object {
       "pinDigests": false,
       "prettyDepType": "dependency",
       "purl": "pkg:github/owner/c?ref=tags",
-      "repositoryUrl": "https://github.com/owner/c",
+      "sourceUrl": "https://github.com/owner/c",
       "versionScheme": "semver",
     },
     Object {
@@ -159,7 +159,7 @@ Object {
       "githubRepo": "owner/e",
       "prettyDepType": "dependency",
       "purl": "pkg:github/owner/e",
-      "repositoryUrl": "https://github.com/owner/e",
+      "sourceUrl": "https://github.com/owner/e",
       "versionScheme": "semver",
     },
     Object {
@@ -172,7 +172,7 @@ Object {
       "pinDigests": false,
       "prettyDepType": "dependency",
       "purl": "pkg:github/owner/f?ref=tags",
-      "repositoryUrl": "https://github.com/owner/f",
+      "sourceUrl": "https://github.com/owner/f",
       "versionScheme": "semver",
     },
     Object {
@@ -217,7 +217,7 @@ Object {
       "githubRepo": "owner/k",
       "prettyDepType": "dependency",
       "purl": "pkg:github/owner/k",
-      "repositoryUrl": "https://github.com/owner/k",
+      "sourceUrl": "https://github.com/owner/k",
       "versionScheme": "semver",
     },
     Object {
@@ -230,7 +230,7 @@ Object {
       "githubRepo": "owner/l",
       "prettyDepType": "dependency",
       "purl": "pkg:github/owner/l",
-      "repositoryUrl": "https://github.com/owner/l",
+      "sourceUrl": "https://github.com/owner/l",
       "versionScheme": "semver",
     },
     Object {
@@ -243,7 +243,7 @@ Object {
       "pinDigests": false,
       "prettyDepType": "dependency",
       "purl": "pkg:github/owner/m?ref=tags",
-      "repositoryUrl": "https://github.com/owner/m",
+      "sourceUrl": "https://github.com/owner/m",
       "versionScheme": "semver",
     },
     Object {
@@ -256,7 +256,7 @@ Object {
       "pinDigests": false,
       "prettyDepType": "dependency",
       "purl": "pkg:github/owner/n?ref=tags",
-      "repositoryUrl": "https://github.com/owner/n",
+      "sourceUrl": "https://github.com/owner/n",
       "versionScheme": "semver",
     },
   ],
diff --git a/test/manager/travis/__snapshots__/package.spec.js.snap b/test/manager/travis/__snapshots__/package.spec.js.snap
index 4199674016..ce123d153b 100644
--- a/test/manager/travis/__snapshots__/package.spec.js.snap
+++ b/test/manager/travis/__snapshots__/package.spec.js.snap
@@ -10,7 +10,7 @@ Array [
       "8.9.4",
       "10.0.1",
     ],
-    "repositoryUrl": "https://github.com/nodejs/node",
+    "sourceUrl": "https://github.com/nodejs/node",
   },
 ]
 `;
diff --git a/test/workers/pr/changelog/index.spec.js b/test/workers/pr/changelog/index.spec.js
index 7ea2ab623d..0adbf5e2fe 100644
--- a/test/workers/pr/changelog/index.spec.js
+++ b/test/workers/pr/changelog/index.spec.js
@@ -15,7 +15,7 @@ const upgrade = {
   versionScheme: 'semver',
   fromVersion: '1.0.0',
   toVersion: '3.0.0',
-  repositoryUrl: 'https://github.com/chalk/chalk',
+  sourceUrl: 'https://github.com/chalk/chalk',
   releases: [
     { version: '0.9.0' },
     { version: '1.0.0', gitRef: 'npm_1.0.0' },
@@ -54,7 +54,7 @@ describe('workers/pr/changelog', () => {
       expect(
         await getChangeLogJSON({
           ...upgrade,
-          repositoryUrl: 'https://github.com/DefinitelyTyped/DefinitelyTyped',
+          sourceUrl: 'https://github.com/DefinitelyTyped/DefinitelyTyped',
         })
       ).toBe(null);
       expect(ghGot.mock.calls).toHaveLength(0);
@@ -73,7 +73,7 @@ describe('workers/pr/changelog', () => {
       expect(
         await getChangeLogJSON({
           ...upgrade,
-          repositoryUrl: 'https://github.com/about',
+          sourceUrl: 'https://github.com/about',
         })
       ).toBe(null);
     });
@@ -131,19 +131,19 @@ describe('workers/pr/changelog', () => {
         })
       ).toMatchSnapshot();
     });
-    it('handles no repositoryUrl', async () => {
+    it('handles no sourceUrl', async () => {
       expect(
         await getChangeLogJSON({
           ...upgrade,
-          repositoryUrl: undefined,
+          sourceUrl: undefined,
         })
       ).toBe(null);
     });
-    it('handles invalid repositoryUrl', async () => {
+    it('handles invalid sourceUrl', async () => {
       expect(
         await getChangeLogJSON({
           ...upgrade,
-          repositoryUrl: 'http://example.com',
+          sourceUrl: 'http://example.com',
         })
       ).toBe(null);
     });
@@ -184,7 +184,7 @@ describe('workers/pr/changelog', () => {
       expect(
         await getChangeLogJSON({
           ...upgrade,
-          repositoryUrl: 'https://github-enterprise.example.com/chalk/chalk',
+          sourceUrl: 'https://github-enterprise.example.com/chalk/chalk',
         })
       ).toMatchSnapshot();
     });
diff --git a/test/workers/pr/index.spec.js b/test/workers/pr/index.spec.js
index 6a9f67a3fe..550ca1175a 100644
--- a/test/workers/pr/index.spec.js
+++ b/test/workers/pr/index.spec.js
@@ -120,7 +120,7 @@ describe('workers/pr', () => {
       config.newValue = '1.1.0';
       config.updateType = 'minor';
       config.homepage = 'https://dummy.com';
-      config.repositoryUrl = 'https://github.com/renovateapp/dummy';
+      config.sourceUrl = 'https://github.com/renovateapp/dummy';
       config.changelogUrl = 'https://github.com/renovateapp/dummy/changelog.md';
       platform.createPr.mockReturnValue({ displayNumber: 'New Pull Request' });
       config.upgrades = [config];
diff --git a/test/workers/repository/onboarding/pr/pr-list.spec.js b/test/workers/repository/onboarding/pr/pr-list.spec.js
index 873bfbe5d1..504ded687a 100644
--- a/test/workers/repository/onboarding/pr/pr-list.spec.js
+++ b/test/workers/repository/onboarding/pr/pr-list.spec.js
@@ -42,7 +42,7 @@ describe('workers/repository/onboarding/pr/pr-list', () => {
           upgrades: [
             {
               updateType: 'pin',
-              repositoryUrl: 'https://a',
+              sourceUrl: 'https://a',
               depName: 'a',
               depType: 'devDependencies',
               newValue: '1.1.0',
@@ -59,7 +59,7 @@ describe('workers/repository/onboarding/pr/pr-list', () => {
           branchName: 'renovate/a-2.x',
           upgrades: [
             {
-              repositoryUrl: 'https://a',
+              sourceUrl: 'https://a',
               depName: 'a',
               currentValue: '^1.0.0',
               depType: 'devDependencies',
diff --git a/test/workers/repository/process/lookup/__snapshots__/index.spec.js.snap b/test/workers/repository/process/lookup/__snapshots__/index.spec.js.snap
index eddbf20534..9227602e95 100644
--- a/test/workers/repository/process/lookup/__snapshots__/index.spec.js.snap
+++ b/test/workers/repository/process/lookup/__snapshots__/index.spec.js.snap
@@ -88,7 +88,7 @@ Object {
       "version": "8.1.0",
     },
   ],
-  "repositoryUrl": null,
+  "sourceUrl": null,
   "updates": Array [
     Object {
       "blockedByPin": true,
@@ -134,7 +134,7 @@ Object {
   "changelogUrl": undefined,
   "homepage": undefined,
   "releases": Array [],
-  "repositoryUrl": null,
+  "sourceUrl": null,
   "updates": Array [
     Object {
       "newDigest": "sha256:abcdef1234567890",
@@ -159,7 +159,7 @@ Object {
       "version": "8.1.0",
     },
   ],
-  "repositoryUrl": null,
+  "sourceUrl": null,
   "updates": Array [
     Object {
       "canBeUnpublished": undefined,
@@ -230,7 +230,7 @@ Marking the latest version of an npm package as deprecated results in the entire
       "version": "1.4.0",
     },
   ],
-  "repositoryUrl": "https://github.com/kriskowal/q",
+  "sourceUrl": "https://github.com/kriskowal/q",
   "updates": Array [
     Object {
       "canBeUnpublished": false,
@@ -437,7 +437,7 @@ Object {
       "version": "1.4.1",
     },
   ],
-  "repositoryUrl": "https://github.com/kriskowal/q",
+  "sourceUrl": "https://github.com/kriskowal/q",
   "updates": Array [
     Object {
       "canBeUnpublished": false,
@@ -859,7 +859,7 @@ Object {
       "version": "9",
     },
   ],
-  "repositoryUrl": null,
+  "sourceUrl": null,
   "updates": Array [
     Object {
       "canBeUnpublished": undefined,
@@ -893,7 +893,7 @@ Object {
       "version": "9.0",
     },
   ],
-  "repositoryUrl": null,
+  "sourceUrl": null,
   "updates": Array [
     Object {
       "canBeUnpublished": undefined,
@@ -942,7 +942,7 @@ Object {
       "version": "8.2.5",
     },
   ],
-  "repositoryUrl": null,
+  "sourceUrl": null,
   "updates": Array [
     Object {
       "canBeUnpublished": undefined,
diff --git a/test/workers/repository/process/lookup/index.spec.js b/test/workers/repository/process/lookup/index.spec.js
index b15a3ca33b..ff1eb4df1c 100644
--- a/test/workers/repository/process/lookup/index.spec.js
+++ b/test/workers/repository/process/lookup/index.spec.js
@@ -977,7 +977,7 @@ describe('manager/npm/lookup', () => {
       const res = await lookup.lookupUpdates(config);
       expect(res).toMatchSnapshot();
       expect(res.releases).toHaveLength(3);
-      expect(res.repositoryUrl).toBeDefined();
+      expect(res.sourceUrl).toBeDefined();
     });
     it('ignores deprecated', async () => {
       config.currentValue = '1.3.0';
-- 
GitLab