Module: Octokit::Client::Commits
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/commits.rb
Instance Method Summary collapse
- #commit(repo, sha, options = {}) ⇒ Object
- #commit_comment(repo, id, options = {}) ⇒ Object
- #commit_comments(repo, sha, options = {}) ⇒ Object
- #commits(repo, branch = "master", options = {}) ⇒ Object (also: #list_commits)
- #list_commit_comments(repo, options = {}) ⇒ Object
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 |
#commit_comment(repo, id, options = {}) ⇒ Object
23 24 25 |
# File 'lib/octokit/client/commits.rb', line 23 def commit_comment(repo, id, ={}) get("/repos/#{Repository.new(repo)}/comments/#{id}", , 3) end |
#commit_comments(repo, sha, options = {}) ⇒ Object
19 20 21 |
# File 'lib/octokit/client/commits.rb', line 19 def commit_comments(repo, sha, ={}) get("/repos/#{Repository.new(repo)}/commits/#{sha}/comments", , 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 |
#list_commit_comments(repo, options = {}) ⇒ Object
15 16 17 |
# File 'lib/octokit/client/commits.rb', line 15 def list_commit_comments(repo, ={}) get("/repos/#{Repository.new(repo)}/comments", , 3) end |