Module: Octokit::Client::Commits
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/commits.rb
Instance Method Summary collapse
- #commit(repo, sha, options = {}) ⇒ Object
- #commits(repo, branch = "master", options = {}) ⇒ Object (also: #list_commits)
Instance Method Details
#commit(repo, sha, options = {}) ⇒ Object
10 11 12 |
# File 'lib/octokit/client/commits.rb', line 10 def commit(repo, sha, ={}) get("/api/v2/json/commits/show/#{Repository.new(repo)}/#{sha}", )['commit'] end |
#commits(repo, branch = "master", options = {}) ⇒ Object Also known as: list_commits
5 6 7 |
# File 'lib/octokit/client/commits.rb', line 5 def commits(repo, branch="master", ={}) get("/api/v2/json/commits/list/#{Repository.new(repo)}/#{branch}", )['commits'] end |