public async Task <IActionResult> ContributorsInformation(string repo, string userName, int count) { var outModel = await _gitHubRepository.GetRecentContributors(_gitHubConfiguration.RepositoryCsv); if (!string.IsNullOrEmpty(repo)) { outModel.First(i => i.Repository.Equals(repo, StringComparison.InvariantCultureIgnoreCase)) .TopWeekContributors.Add(new GitHubContributor { Author = userName, Commits = count }); } var newsPosts = await GetNewsFromDiscoverDotNet(); var outViewModel = new TickerViewModel() { GitHubInformation = outModel.ToArray(), News = newsPosts }; ViewBag.Configuration = _gitHubConfiguration; return(View($"contributor_{_gitHubConfiguration.DisplayMode}", outViewModel)); }
public async Task <IActionResult> ContributorsInformation(string repo, string userName, int count) { var outModel = await _githubRepository.GetRecentContributors(_githubConfiguration.RepositoryCsv); if (!string.IsNullOrEmpty(repo)) { outModel.First(i => i.Repository.Equals(repo, StringComparison.InvariantCultureIgnoreCase)).TopWeekContributors.Add(new GitHubContributor { Author = userName, Commits = count }); } //Viewbag.Configuration = _githubConfiguration; return(Ok($"contributor {_githubConfiguration.DisplayMode} {outModel.ToArray()}")); }