fix(bazel): handling of non-github URLs in git_repository (#4407)

This commit is contained in:
Henning Perl 2019-08-31 07:10:22 +02:00 committed by Rhys Arkins
parent e0abae7cea
commit 66f10121f0

View file

@ -172,10 +172,13 @@ export function extractPackageFile(content: string): PackageFile | null {
if (commit) { if (commit) {
dep.currentDigest = commit; dep.currentDigest = commit;
} }
const repo = parse(remote).substring('https://github.com/'.length); const githubURL = parse(remote);
dep.datasource = 'github'; if (githubURL) {
dep.lookupName = repo; const repo = githubURL.substring('https://github.com/'.length);
deps.push(dep); dep.datasource = 'github';
dep.lookupName = repo;
deps.push(dep);
}
} else if ( } else if (
depType === 'go_repository' && depType === 'go_repository' &&
depName && depName &&