Module: Octokit::Client::Commits

Included in:
Octokit::Client
Defined in:
lib/octokit/client/commits.rb

Instance Method Summary collapse

Instance Method Details

#commit(repo, sha, options = {}) ⇒ Object



11
12
13
# File 'lib/octokit/client/commits.rb', line 11

def commit(repo, sha, options={})
  get("/repos/#{Repository.new(repo)}/commits/#{sha}", options, 3)
end

#commit_comment(repo, id, options = {}) ⇒ Object



23
24
25
# File 'lib/octokit/client/commits.rb', line 23

def commit_comment(repo, id, options={})
  get("/repos/#{Repository.new(repo)}/comments/#{id}", options, 3)
end

#commit_comments(repo, sha, options = {}) ⇒ Object



19
20
21
# File 'lib/octokit/client/commits.rb', line 19

def commit_comments(repo, sha, options={})
  get("/repos/#{Repository.new(repo)}/commits/#{sha}/comments", options, 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", options={})
  options = { :per_page => 35, :sha => branch }.merge options
  get("/repos/#{Repository.new(repo)}/commits", options, 3)
end

#list_commit_comments(repo, options = {}) ⇒ Object



15
16
17
# File 'lib/octokit/client/commits.rb', line 15

def list_commit_comments(repo, options={})
  get("/repos/#{Repository.new(repo)}/comments", options, 3)
end