Module: Bucketkit::Client::Commits

Included in:
Bucketkit::Client
Defined in:
lib/bucketkit/client/commits.rb

Overview

Constant Summary collapse

API_ENDPOINT =
'api/2.0/repositories'.freeze

Instance Method Summary collapse

Instance Method Details

#approve_commit(repo, revision, options = {}) ⇒ Object



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

def approve_commit(repo, revision, options={})
  post "#{API_ENDPOINT}/#{Repository.new(repo)}/commit/#{revision}/approve", options
end

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



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

def commit(repo, revision, options={})
  get "#{API_ENDPOINT}/#{Repository.new(repo)}/commit/#{revision}", options
end

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



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

def commit_comment(repo, revision, comment_id, options={})
  get "#{API_ENDPOINT}/#{Repository.new(repo)}/commit/#{revision}/comments/#{comment_id}", options
end

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



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

def commit_comments(repo, revision, options={})
  get "#{API_ENDPOINT}/#{Repository.new(repo)}/commit/#{revision}/comments", options
end

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



7
8
9
# File 'lib/bucketkit/client/commits.rb', line 7

def commits(repo, options={})
  paginate "#{API_ENDPOINT}/#{Repository.new(repo)}/commits", options
end

#delete_commit_approval(repo, revision, options = {}) ⇒ Object



27
28
29
# File 'lib/bucketkit/client/commits.rb', line 27

def delete_commit_approval(repo, revision, options={})
  delete "#{API_ENDPOINT}/#{Repository.new(repo)}/commit/#{revision}/approve", options
end