public async Task OnGet(int channelId, string owner, string repo) { var channel = await _client.GetChannelAsync(channelId, ApiVersion13._20190116); ChannelName = channel.Name; var repoUrl = $"https://github.com/{owner}/{repo}"; var latest = await _client.GetLatestAsync(repoUrl, null, null, channelId, null, null, false, ApiVersion10._20190116, CancellationToken.None); var graph = await _client.GetBuildGraphAsync(latest.Id, (ApiVersion9)ApiVersion40._20190116, CancellationToken.None); Build = graph.Builds[latest.Id.ToString()]; var incoming = new List <IncomingRepo>(); foreach (var dep in Build.Dependencies) { var lastConsumedBuildOfDependency = graph.Builds[dep.BuildId.ToString()]; var gitHubInfo = GetGitHubInfo(lastConsumedBuildOfDependency); if (!IncludeRepo(gitHubInfo)) { continue; } var(commitDistance, commitAge) = await GetCommitInfo(gitHubInfo, lastConsumedBuildOfDependency); var oldestPublishedButUnconsumedBuild = await GetOldestUnconsumedBuild(lastConsumedBuildOfDependency.Id); incoming.Add(new IncomingRepo( lastConsumedBuildOfDependency, shortName: gitHubInfo?.Repo ?? "", oldestPublishedButUnconsumedBuild, GetCommitUrl(lastConsumedBuildOfDependency), GetBuildUrl(lastConsumedBuildOfDependency), commitDistance, commitAge)); } IncomingRepositories = incoming; CurrentRateLimit = _github.GetLastApiInfo().RateLimit; }