From 66f10121f0128d1eb1e94823adc75d8b5492541d Mon Sep 17 00:00:00 2001
From: Henning Perl <perl@code-intelligence.com>
Date: Sat, 31 Aug 2019 07:10:22 +0200
Subject: [PATCH] fix(bazel): handling of non-github URLs in git_repository
 (#4407)

---
 lib/manager/bazel/extract.ts | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/manager/bazel/extract.ts b/lib/manager/bazel/extract.ts
index 715bef242f..f97ba65b08 100644
--- a/lib/manager/bazel/extract.ts
+++ b/lib/manager/bazel/extract.ts
@@ -172,10 +172,13 @@ export function extractPackageFile(content: string): PackageFile | null {
       if (commit) {
         dep.currentDigest = commit;
       }
-      const repo = parse(remote).substring('https://github.com/'.length);
-      dep.datasource = 'github';
-      dep.lookupName = repo;
-      deps.push(dep);
+      const githubURL = parse(remote);
+      if (githubURL) {
+        const repo = githubURL.substring('https://github.com/'.length);
+        dep.datasource = 'github';
+        dep.lookupName = repo;
+        deps.push(dep);
+      }
     } else if (
       depType === 'go_repository' &&
       depName &&
-- 
GitLab