mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-17 04:52:10 +01:00
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:
2
gradle/changelog/submodule_without_http.yaml
Normal file
2
gradle/changelog/submodule_without_http.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
- type: fixed
|
||||
description: Source view with submodules without http or https URL
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user