Module: GitHub::Client::Commits
- Included in:
- GitHub::Client
- Defined in:
- lib/github_api_v3/client/commits.rb
Overview
Methods for the Commits API.
Instance Method Summary collapse
-
#commit(owner, repo, sha) ⇒ Hash
Get a single commit.
-
#commits(owner, repo, options = {}) ⇒ Array
List commits on a repository.
-
#compare_commits(owner, repo, base, head) ⇒ Hash
Compare two commits.
Instance Method Details
#commit(owner, repo, sha) ⇒ Hash
Get a single commit.
32 33 34 |
# File 'lib/github_api_v3/client/commits.rb', line 32 def commit(owner, repo, sha) get "/repos/#{owner}/#{repo}/commits/#{sha}" end |
#commits(owner, repo, options = {}) ⇒ Array
List commits on a repository.
21 22 23 |
# File 'lib/github_api_v3/client/commits.rb', line 21 def commits(owner, repo, ={}) get "/repos/#{owner}/#{repo}/commits", params: end |
#compare_commits(owner, repo, base, head) ⇒ Hash
Compare two commits.
44 45 46 |
# File 'lib/github_api_v3/client/commits.rb', line 44 def compare_commits(owner, repo, base, head) get "/repos/#{owner}/#{repo}/compare/#{base}...#{head}" end |