Skip to content

Commit e1820a4

Browse files
committed
Add explanatory comment.
1 parent cc64eed commit e1820a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/shared/GitHub/GitHubRestApi.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ private Uri GetApiRequestUri(Uri targetUri, string apiUrl)
212212
{
213213
// If we're here, it's GitHub Enterprise via a configured authority
214214
var baseUrl = targetUri.GetLeftPart(UriPartial.Authority);
215+
216+
// Check for 'raw.' in the hostname and remove it to get the correct GHE API URL
215217
baseUrl = Regex.Replace(baseUrl, @"^(https?://)raw\.", "$1", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
218+
216219
return new Uri(baseUrl + $"/api/v3/{apiUrl}");
217220
}
218221
}

0 commit comments

Comments
 (0)