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 = {}) ⇒ Comment
Add a comment to an issue.
-
#close_issue(repo, number, options = {}) ⇒ Issue
Close an issue.
-
#create_issue(repo, title, body, options = {}) ⇒ Issue
(also: #open_issue)
Create an issue for a repository.
-
#delete_comment(repo, number, options = {}) ⇒ Response
Delete a single comment.
-
#issue(repo, number, options = {}) ⇒ Issue
Get a single issue from a repository.
-
#issue_comment(repo, number, options = {}) ⇒ Comment
Get a single comment attached to an issue.
-
#issue_comments(repo, number, options = {}) ⇒ Array
Get all comments attached to an issue.
-
#issue_event(repo, number, options = {}) ⇒ Event
Get information on a single Issue Event.
-
#issue_events(repo, number, options = {}) ⇒ Array
List events for an Issue.
-
#list_issues(repository, options = {}) ⇒ Array
(also: #issues)
List issues for a repository.
-
#reopen_issue(repo, number, options = {}) ⇒ Issue
Reopen an issue.
-
#search_issues(repo, search_term, state = 'open', options = {}) ⇒ Array
deprecated
Deprecated.
Please use ‘list_issues` instead
-
#update_comment(repo, number, comment, options = {}) ⇒ Comment
Update a single comment on an issue.
-
#update_issue(repo, number, title, body, options = {}) ⇒ Issue
Update an issue.
Instance Method Details
#add_comment(repo, number, comment, options = {}) ⇒ Comment
Add a comment to an issue
143 144 145 |
# File 'lib/octokit/client/issues.rb', line 143 def add_comment(repo, number, comment, ={}) post("/repos/#{Repository.new(repo)}/issues/#{number}/comments", .merge({:body => comment}), 3) end |
#close_issue(repo, number, options = {}) ⇒ Issue
This implementation needs to be adjusted with switch to API v3
Close an issue
76 77 78 |
# File 'lib/octokit/client/issues.rb', line 76 def close_issue(repo, number, ={}) post("/repos/#{Repository.new(repo)}/issues/#{number}", .merge({:state => "closed"}), 3) end |
#create_issue(repo, title, body, options = {}) ⇒ Issue Also known as: open_issue
Create an issue for a repository
49 50 51 |
# File 'lib/octokit/client/issues.rb', line 49 def create_issue(repo, title, body, ={}) post("/repos/#{Repository.new(repo)}/issues", .merge({:title => title, :body => body}), 3) end |
#delete_comment(repo, number, options = {}) ⇒ Response
Delete a single comment
168 169 170 |
# File 'lib/octokit/client/issues.rb', line 168 def delete_comment(repo, number, ={}) delete("/repos/#{Repository.new(repo)}/issues/comments/#{number}", , 3, true, true) end |
#issue(repo, number, options = {}) ⇒ Issue
Get a single issue from a repository
62 63 64 |
# File 'lib/octokit/client/issues.rb', line 62 def issue(repo, number, ={}) get("/repos/#{Repository.new(repo)}/issues/#{number}", , 3) end |
#issue_comment(repo, number, options = {}) ⇒ Comment
Get a single comment attached to an issue
130 131 132 |
# File 'lib/octokit/client/issues.rb', line 130 def issue_comment(repo, number, ={}) get("/repos/#{Repository.new(repo)}/issues/comments/#{number}", , 3) end |
#issue_comments(repo, number, options = {}) ⇒ Array
Get all comments attached to an issue
118 119 120 |
# File 'lib/octokit/client/issues.rb', line 118 def issue_comments(repo, number, ={}) get("/repos/#{Repository.new(repo)}/issues/#{number}/comments", , 3) end |
#issue_event(repo, number, options = {}) ⇒ Event
Get information on a single Issue Event
195 196 197 |
# File 'lib/octokit/client/issues.rb', line 195 def issue_event(repo, number, ={}) get("/repos/#{Repository.new(repo)}/issues/events/#{number}", , 3) end |
#issue_events(repo, number, options = {}) ⇒ Array
List events for an Issue
182 183 184 |
# File 'lib/octokit/client/issues.rb', line 182 def issue_events(repo, number, ={}) get("/repos/#{Repository.new(repo)}/issues/#{number}/events", , 3) end |
#list_issues(repository, options = {}) ⇒ Array Also known as: issues
List issues for a repository
35 36 37 |
# File 'lib/octokit/client/issues.rb', line 35 def list_issues(repository, ={}) get("/repos/#{Repository.new(repository)}/issues", , 3) end |
#reopen_issue(repo, number, options = {}) ⇒ Issue
This implementation needs to be adjusted with switch to API v3
Reopen an issue
90 91 92 |
# File 'lib/octokit/client/issues.rb', line 90 def reopen_issue(repo, number, ={}) post("/repos/#{Repository.new(repo)}/issues/#{number}", .merge({:state => "open"}), 3) end |
#search_issues(repo, search_term, state = 'open', options = {}) ⇒ Array
Please use ‘list_issues` instead
Search issues within a repository
15 16 17 |
# File 'lib/octokit/client/issues.rb', line 15 def search_issues(repo, search_term, state='open', ={}) get("/legacy/issues/search/#{Repository.new(repo)}/#{state}/#{search_term}", , 3)['issues'] end |
#update_comment(repo, number, comment, options = {}) ⇒ Comment
Update a single comment on an issue
156 157 158 |
# File 'lib/octokit/client/issues.rb', line 156 def update_comment(repo, number, comment, ={}) post("/repos/#{Repository.new(repo)}/issues/comments/#{number}", .merge({:body => comment}), 3) end |
#update_issue(repo, number, title, body, options = {}) ⇒ Issue
This implementation needs to be adjusted with switch to API v3
Update an issue
106 107 108 |
# File 'lib/octokit/client/issues.rb', line 106 def update_issue(repo, number, title, body, ={}) post("/repos/#{Repository.new(repo)}/issues/#{number}", .merge({:title => title, :body => body}), 3) end |