in TeamCity.GitHubIssues-server/src/main/java/jetbrains/buildServer/issueTracker/github/GitHubIssueFetcher.java [46:66]
public IssueData getIssue(@NotNull String host, // repository url
@NotNull String id, // issue id
@Nullable Credentials credentials) throws Exception {
final String issueURL = getUrl(host, id);
final String issueId = getIssueId(id);
URL url;
try {
url = new URL(host);
final Matcher m = GitHubConstants.OWNER_AND_REPO_PATTERN.matcher(url.getPath());
if (!m.matches()) {
throw new IllegalArgumentException("URL + [" + url.toString() + "] does not contain owner and repository info");
}
return getFromCacheOrFetch(issueURL, new MyFetchFunction(url, m.group(1), m.group(2), issueId, credentials,
mySslTrustStoreProvider.getTrustStore()));
} catch (MalformedURLException e) {
LOG.warn(e);
throw new RuntimeException(e);
} catch (RequestException e) {
throw new HttpRequestException(e.getStatus(), e.getError().getMessage(), e);
}
}