mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 08:00:19 +01:00
Trim trailing .git from remote repository names
This commit is contained in:
@@ -51,6 +51,8 @@ namespace Tgstation.Server.Host.Components.Repository
|
||||
|
||||
RemoteRepositoryOwner = remoteUrl.Segments[1].TrimEnd('/');
|
||||
RemoteRepositoryName = remoteUrl.Segments[2].TrimEnd('/');
|
||||
if (RemoteRepositoryName.EndsWith(".git", StringComparison.OrdinalIgnoreCase))
|
||||
RemoteRepositoryName = RemoteRepositoryName[0..^4];
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace Tgstation.Server.Host.Components.Repository
|
||||
{
|
||||
RemoteRepositoryOwner = remoteUrl.Segments[1].TrimEnd('/');
|
||||
RemoteRepositoryName = remoteUrl.Segments[2].TrimEnd('/');
|
||||
if (RemoteRepositoryName.EndsWith(".git", StringComparison.OrdinalIgnoreCase))
|
||||
RemoteRepositoryName = RemoteRepositoryName.Substring(0, RemoteRepositoryName.Length - 4);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user