Short description and motivation.
How to use my plugin.
Add this line to your application's Gemfile:
gem 'git_hub_stats'
And then execute:
$ bundle
Or install it yourself as:
$ gem install git_hub_stats
The below fetch_and_save!
methods:
- Hit GitHub's REST API v3
- Get all of your:
- merged pull requests, associated commits and associated GitHub users
- closed issues and associated GitHub users
- across all of your repositories
- Convert GitHub's data into a common, calculable, reusable format
- Save the formatted data to a new
GitHubStatistic
table - Save the associated GitHub users to a new
GitHubUser
table
GitHubStats::PullRequets.new.fetch_and_save!
GitHubStats::Issues.new.fetch_and_save!
GitHubStats creates a combination of queries and methods that aggregate and calculate customer facing statistics, namely:
GitHubStats::Presenter.new(options).totals
GitHubStats::Presenter.new(options).totals_by_repository
GitHubStats::Presenter.new(options).totals_for_user
GitHubStats::Presenter.new(options).totals_for_user_in_repository
GitHubStats::Presenter.new(options).averages
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.