Fix display for submodules without http

Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
This commit is contained in:
Rene Pfeuffer
2023-11-03 15:48:10 +01:00
parent b4136b9679
commit b0d319f99b
2 changed files with 5 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
- type: fixed
description: Source view with submodules without http or https URL

View File

@@ -36,6 +36,9 @@ type Props = {
};
const getHostname = (repositoryUrl: string) => {
if (!repositoryUrl.startsWith("http://") && !repositoryUrl.startsWith("https://")) {
return undefined;
}
let host = repositoryUrl.split("/")[2];
if (host.includes("@")) {
// remove prefix