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
11 12 13 |
# File 'lib/octokit/client/commits.rb', line 11 def commit(repo, sha, ={}) get("/repos/#{Repository.new(repo)}/commits/#{sha}", , 3) end |
#commits(repo, branch = "master", options = {}) ⇒ Object Also known as: list_commits
5 6 7 8 |
# File 'lib/octokit/client/commits.rb', line 5 def commits(repo, branch="master", ={}) = { :per_page => 35, :sha => branch }.merge get("/repos/#{Repository.new(repo)}/commits", , 3) end |