From d89777193987c99715ffe7164e0eea43277999c4 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 3 Dec 2017 17:10:27 -0500 Subject: [PATCH] Fix GetRepositoryRemote --- TGS.ControlPanel/Program.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TGS.ControlPanel/Program.cs b/TGS.ControlPanel/Program.cs index c0598cbdd9..b72f48eb78 100644 --- a/TGS.ControlPanel/Program.cs +++ b/TGS.ControlPanel/Program.cs @@ -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];