File tree Expand file tree Collapse file tree
StyleCop.Analyzers.Status.Generator Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22{
33 using System ;
44 using System . IO ;
5+ using System . Linq ;
56 using LibGit2Sharp ;
67 using Newtonsoft . Json ;
78
@@ -26,20 +27,29 @@ internal static void Main(string[] args)
2627
2728 var diagnostics = reader . GetDiagnosticsAsync ( ) . Result ;
2829
30+ Commit commit ;
2931 string commitId ;
3032
3133 using ( Repository repository = new Repository ( Path . GetDirectoryName ( args [ 0 ] ) ) )
3234 {
3335 commitId = repository . Head . Tip . Sha ;
34- }
36+ commit = repository . Head . Tip ;
3537
36- var output = new
37- {
38- diagnostics ,
39- commitId
40- } ;
38+ var output = new
39+ {
40+ diagnostics ,
41+ git = new
42+ {
43+ commit . Sha ,
44+ commit . Message ,
45+ commit . Author ,
46+ commit . Committer ,
47+ Parents = commit . Parents . Select ( x => x . Sha )
48+ }
49+ } ;
4150
42- Console . WriteLine ( JsonConvert . SerializeObject ( output ) ) ;
51+ Console . WriteLine ( JsonConvert . SerializeObject ( output ) ) ;
52+ }
4353 }
4454 }
4555}
You can’t perform that action at this time.
0 commit comments