Skip to content

Commit

Permalink
Merge pull request #679 from valadas/logging-repo-stats
Browse files Browse the repository at this point in the history
Adds null coalescing logic to commits grouping in RepoStats plugin
  • Loading branch information
valadas authored Jul 29, 2022
2 parents 5baf939 + d39ef04 commit 3dacbaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/DNNCommunity.DNNDocs.Plugins/RepoStatsBuildStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void Postbuild(ImmutableList<FileModel> models, IHostService host)
try
{
content["gitContributor" + i + "Contributions"] = gitContributors[i - 1].Contributions;
Console.WriteLine($"Added contributor contributions {i}: {gitContributors[i - 1].Contributions}");
Console.WriteLine($"Added contributor {i} contributions: {gitContributors[i - 1].Contributions}");
content["gitContributor" + i + "Login"] = gitContributors[i - 1].Login;
Console.WriteLine($"Added contributor {i} login: {gitContributors[i-1].Login}");
content["gitContributor" + i + "AvatarUrl"] = gitContributors[i - 1].AvatarUrl;
Expand All @@ -64,7 +64,7 @@ public void Postbuild(ImmutableList<FileModel> models, IHostService host)
}
}

var groupedCommits = gitCommits.GroupBy(x => x.Author.Login);
var groupedCommits = gitCommits.GroupBy(x => x?.Author?.Login);
Console.WriteLine($"Found {groupedCommits.Count()} grouped commits.");

groupedCommits = groupedCommits.OrderByDescending(x => x.Count());
Expand Down

0 comments on commit 3dacbaf

Please sign in to comment.