Created
September 6, 2022 14:01
-
-
Save alhafoudh/6aad27c3118de9dbad5c309272bc0ee1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Project.all.map do |p| | |
[ | |
p, | |
total_size = p.container_repositories.reduce(0) do | acc, cr | | |
acc + cr.tags.reduce(0) do |acc,t| acc + ((t.total_size || 0) / 1024.0 / 1024.0) | |
end | |
end | |
] | |
end.sort_by(&:last).reverse.map do |(p, total_size)| | |
printf "%10.2f %s\n", total_size, p.name | |
end;nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment