enhance: supports issue link in keywords (#678)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-11 12:16:20 +08:00
parent 0842beb51d
commit 050b1d1188
No known key found for this signature in database
5 changed files with 45 additions and 28 deletions

View file

@ -118,7 +118,7 @@ namespace SourceGit.ViewModels
var trimmedUrl = url;
if (url.EndsWith(".git"))
trimmedUrl = url.Substring(0, url.Length - 4);
if (url.StartsWith("https://github.com/", StringComparison.Ordinal))
WebLinks.Add(new Models.CommitLink() { Name = $"Github ({trimmedUrl.Substring(19)})", URLPrefix = $"{url}/commit/" });
else if (url.StartsWith("https://gitlab.", StringComparison.Ordinal))