Skip to content

Instantly share code, notes, and snippets.

@zealot128
Created April 6, 2017 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zealot128/b9f2bf027a26e5f981acb38e3e00c37f to your computer and use it in GitHub Desktop.
Save zealot128/b9f2bf027a26e5f981acb38e3e00c37f to your computer and use it in GitHub Desktop.
gitlab stats
# RAILS_ENV=production bundle exec rails r run.rb
puts "All Time:"
puts "-------------------"
puts "Number of successful deploys into production:"
puts Ci::Pipeline.where(ref: 'master').where(status: 'success').count
puts "Number of commits over all projects (no forks)"
puts Project.all.reject{|p| p.forked? }.map{|i| i.statistics.commit_count }.sum
puts "Number of issues"
puts Issue.count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment