diff --git a/Netkan/Sources/Github/GithubApi.cs b/Netkan/Sources/Github/GithubApi.cs index c9d1b21e8..1be237733 100644 --- a/Netkan/Sources/Github/GithubApi.cs +++ b/Netkan/Sources/Github/GithubApi.cs @@ -40,7 +40,7 @@ internal sealed class GithubApi : IGithubApi // https://raw.githubusercontent.com//// private static readonly Regex githubUserContentUrlRegex = - new Regex(@"^/(?[^/]+)/(?[^/]+)/(?[^/]+)/(?.+)$", + new Regex(@"^/(?[^/]+)/(?[^/]+)/(refs/heads/)?(?[^/]+)/(?.+)$", RegexOptions.Compiled); public GithubApi(IHttpService http, string? oauthToken = null) @@ -115,7 +115,8 @@ public List getOrgMembers(GithubUser organization) out string? ghBranch, out string? ghPath)) { - Log.Info("Found GitHub URL, retrieving with API"); + Log.InfoFormat("Found GitHub URL, retrieving with API: {0} {1} {2} {3}", + ghOwner, ghRepo, ghBranch, ghPath); return Call( $"repos/{ghOwner}/{ghRepo}/contents/{ghPath}?ref={ghBranch}", rawMediaType);