This repository was archived by the owner on Jan 22, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11## [ Unreleased]
22
3+ - ` git pkgs stats ` now shows top authors in default output
4+
35## [ 0.5.0] - 2026-01-04
46
57- ` git pkgs init ` now installs git hooks by default (use ` --no-hooks ` to skip)
Original file line number Diff line number Diff line change @@ -103,6 +103,16 @@ def collect_stats(branch, branch_name)
103103 { path : manifest . path , ecosystem : manifest . ecosystem , changes : change_counts [ manifest . id ] || 0 }
104104 end
105105
106+ top_authors = changes
107+ . where ( change_type : "added" )
108+ . joins ( :commit )
109+ . group ( "commits.author_name" )
110+ . order ( "count_all DESC" )
111+ . limit ( 5 )
112+ . count
113+
114+ data [ :top_authors ] = top_authors . map { |name , count | { name : name , added : count } }
115+
106116 data
107117 end
108118
@@ -159,6 +169,15 @@ def output_text(data)
159169 data [ :manifests ] . each do |m |
160170 puts " #{ m [ :path ] } (#{ m [ :ecosystem ] } ): #{ m [ :changes ] } changes"
161171 end
172+
173+ if data [ :top_authors ] &.any?
174+ puts
175+ puts "Top Authors (by deps added)"
176+ puts "-" * 27
177+ data [ :top_authors ] . each do |author |
178+ puts " #{ author [ :added ] . to_s . rjust ( 4 ) } #{ author [ :name ] } "
179+ end
180+ end
162181 end
163182
164183 def output_by_author
You can’t perform that action at this time.
0 commit comments