mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-26 14:37:44 +01:00
Fix GetRepositoryRemote
This commit is contained in:
@@ -115,6 +115,11 @@ namespace TGS.ControlPanel
|
||||
}
|
||||
|
||||
//Assume standard gh format: [(git)|(https)]://github.com/owner/repo(.git)[0-1]
|
||||
//Yes use .git twice in case it was weird
|
||||
var toRemove = new string[] { ".git", "/", ".git" };
|
||||
foreach (string item in toRemove)
|
||||
if (remote.EndsWith(item))
|
||||
remote = remote.Substring(0, remote.LastIndexOf(item));
|
||||
var splits = remote.Split('/');
|
||||
name = splits[splits.Length - 1];
|
||||
owner = splits[splits.Length - 2].Split('.')[0];
|
||||
|
||||
Reference in New Issue
Block a user