diff --git a/OurUmbraco.Site/Views/Partials/Community/Home.cshtml b/OurUmbraco.Site/Views/Partials/Community/Home.cshtml index 90510ae4..6f3c6d61 100644 --- a/OurUmbraco.Site/Views/Partials/Community/Home.cshtml +++ b/OurUmbraco.Site/Views/Partials/Community/Home.cshtml @@ -140,7 +140,6 @@ else

GitHub Contributions

- Contributions to Umbraco GitHub repositories Contributions to default branches for Umbraco-CMS, @@ -153,7 +152,7 @@ else

- GitHub contributors + Contributions the last 12 months (number indicating accepted commits)
diff --git a/OurUmbraco/Community/Controllers/GitHubContributorController.cs b/OurUmbraco/Community/Controllers/GitHubContributorController.cs index 3abf80a0..d32109b1 100644 --- a/OurUmbraco/Community/Controllers/GitHubContributorController.cs +++ b/OurUmbraco/Community/Controllers/GitHubContributorController.cs @@ -65,7 +65,7 @@ namespace OurUmbraco.Community.Controllers } } - // filter to only include items from the last year + // filter to only include items from the last year (if we ran 4.6.1 we could have used ToUnixTimeSeconds()) var filteredRange = DateTime.UtcNow.AddYears(-1).Subtract(new DateTime(1970, 1, 1)).TotalSeconds; foreach (var contrib in gitHubContributors) @@ -73,7 +73,7 @@ namespace OurUmbraco.Community.Controllers var contribWeeks = contrib.Weeks.Where(x => x.W >= filteredRange).ToList(); contrib.TotalAdditions = contribWeeks.Sum(x=>x.A); contrib.TotalDeletions = contribWeeks.Sum(x=>x.D); - contrib.Total = contrib.TotalAdditions + contrib.TotalDeletions; + contrib.Total = contribWeeks.Sum(x => x.C); } var filteredContributors = gitHubContributors