it works
This commit is contained in:
		
							
								
								
									
										35
									
								
								Program.cs
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								Program.cs
									
									
									
									
									
								
							@@ -1,2 +1,33 @@
 | 
				
			|||||||
// See https://aka.ms/new-console-template for more information
 | 
					using LibGit2Sharp;
 | 
				
			||||||
Console.WriteLine("Hello, World!");
 | 
					
 | 
				
			||||||
 | 
					static class Public
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    internal static void Main(string[] args)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        List<string> authors = new List<string>();
 | 
				
			||||||
 | 
					        Dictionary<string, int> commitReport = new Dictionary<string, int>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        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()}");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user