From f732a666af29c95c2f60b90f015351afc0394a7f Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Fri, 29 Jul 2022 18:18:24 -0400 Subject: [PATCH] it works --- Program.cs | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/Program.cs b/Program.cs index 3751555..753919a 100644 --- a/Program.cs +++ b/Program.cs @@ -1,2 +1,33 @@ -// See https://aka.ms/new-console-template for more information -Console.WriteLine("Hello, World!"); +using LibGit2Sharp; + +static class Public +{ + internal static void Main(string[] args) + { + List authors = new List(); + Dictionary commitReport = new Dictionary(); + + using (var repo = new Repository(@".")) + { + foreach (var c in repo.Commits) + { + if (!authors.Contains(c.Author.Email)) + { + authors.Add(c.Author.Email); + } + } + + foreach (var a in authors) + { + int commitCount = repo.Commits.OrderBy(a => a.Author).Count(); + commitReport.Add(a, commitCount); + } + + } + + foreach (var r in commitReport) + { + System.Console.WriteLine($"{r.ToString()}"); + } + } +}