Module: Octokit::Client::Issues
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/issues.rb
Instance Method Summary collapse
- #add_comment(repo, number, comment, options = {}) ⇒ Object
- #add_label(repo, label, number = nil, options = {}) ⇒ Object
- #close_issue(repo, number, options = {}) ⇒ Object
- #create_issue(repo, title, body, options = {}) ⇒ Object (also: #open_issue)
- #issue(repo, number, options = {}) ⇒ Object
- #issue_comments(repo, number, options = {}) ⇒ Object
- #issues(repo, state = 'open', options = {}) ⇒ Object (also: #list_issues)
- #issues_labeled(repo, label, options = {}) ⇒ Object
- #labels(repo, options = {}) ⇒ Object
- #remove_label(repo, label, number = nil, options = {}) ⇒ Object
- #reopen_issue(repo, number, options = {}) ⇒ Object
- #search_issues(repo, search_term, state = 'open', options = {}) ⇒ Object
- #update_issue(repo, number, title, body, options = {}) ⇒ Object
Instance Method Details
#add_comment(repo, number, comment, options = {}) ⇒ Object
55 56 57 |
# File 'lib/octokit/client/issues.rb', line 55 def add_comment(repo, number, comment, ={}) post("issues/comment/#{Repository.new(repo)}/#{number}", .merge({:comment => comment}))['comment'] end |
#add_label(repo, label, number = nil, options = {}) ⇒ Object
47 48 49 |
# File 'lib/octokit/client/issues.rb', line 47 def add_label(repo, label, number=nil, ={}) post(["issues/label/add/#{Repository.new(repo)}/#{label}", number].compact.join('/'), )['labels'] end |
#close_issue(repo, number, options = {}) ⇒ Object
31 32 33 |
# File 'lib/octokit/client/issues.rb', line 31 def close_issue(repo, number, ={}) post("issues/close/#{Repository.new(repo)}/#{number}", )['issue'] end |
#create_issue(repo, title, body, options = {}) ⇒ Object Also known as: open_issue
26 27 28 |
# File 'lib/octokit/client/issues.rb', line 26 def create_issue(repo, title, body, ={}) post("issues/open/#{Repository.new(repo)}", .merge({:title => title, :body => body}))['issue'] end |
#issue(repo, number, options = {}) ⇒ Object
18 19 20 |
# File 'lib/octokit/client/issues.rb', line 18 def issue(repo, number, ={}) get("issues/show/#{Repository.new(repo)}/#{number}", )['issue'] end |
#issue_comments(repo, number, options = {}) ⇒ Object
22 23 24 |
# File 'lib/octokit/client/issues.rb', line 22 def issue_comments(repo, number, ={}) get("issues/comments/#{Repository.new(repo)}/#{number}", )['comments'] end |
#issues(repo, state = 'open', options = {}) ⇒ Object Also known as: list_issues
9 10 11 |
# File 'lib/octokit/client/issues.rb', line 9 def issues(repo, state='open', ={}) get("issues/list/#{Repository.new(repo)}/#{state}", )['issues'] end |
#issues_labeled(repo, label, options = {}) ⇒ Object
14 15 16 |
# File 'lib/octokit/client/issues.rb', line 14 def issues_labeled(repo, label, ={}) get("issues/list/#{Repository.new(repo)}/label/#{label}", )['issues'] end |
#labels(repo, options = {}) ⇒ Object
43 44 45 |
# File 'lib/octokit/client/issues.rb', line 43 def labels(repo, ={}) get("issues/labels/#{Repository.new(repo)}", )['labels'] end |
#remove_label(repo, label, number = nil, options = {}) ⇒ Object
51 52 53 |
# File 'lib/octokit/client/issues.rb', line 51 def remove_label(repo, label, number=nil, ={}) post(["issues/label/remove/#{Repository.new(repo)}/#{label}", number].compact.join('/'), )['labels'] end |
#reopen_issue(repo, number, options = {}) ⇒ Object
35 36 37 |
# File 'lib/octokit/client/issues.rb', line 35 def reopen_issue(repo, number, ={}) post("issues/reopen/#{Repository.new(repo)}/#{number}", )['issue'] end |
#search_issues(repo, search_term, state = 'open', options = {}) ⇒ Object
5 6 7 |
# File 'lib/octokit/client/issues.rb', line 5 def search_issues(repo, search_term, state='open', ={}) get("issues/search/#{Repository.new(repo)}/#{state}/#{search_term}", )['issues'] end |
#update_issue(repo, number, title, body, options = {}) ⇒ Object
39 40 41 |
# File 'lib/octokit/client/issues.rb', line 39 def update_issue(repo, number, title, body, ={}) post("issues/edit/#{Repository.new(repo)}/#{number}", .merge({:title => title, :body => body}))['issue'] end |