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
144 145 146 |
# File 'lib/octokit/client/issues.rb', line 144 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
77 78 79 |
# File 'lib/octokit/client/issues.rb', line 77 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
50 51 52 |
# File 'lib/octokit/client/issues.rb', line 50 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
169 170 171 |
# File 'lib/octokit/client/issues.rb', line 169 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
63 64 65 |
# File 'lib/octokit/client/issues.rb', line 63 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
131 132 133 |
# File 'lib/octokit/client/issues.rb', line 131 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
119 120 121 |
# File 'lib/octokit/client/issues.rb', line 119 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
196 197 198 |
# File 'lib/octokit/client/issues.rb', line 196 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
183 184 185 |
# File 'lib/octokit/client/issues.rb', line 183 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
36 37 38 |
# File 'lib/octokit/client/issues.rb', line 36 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
91 92 93 |
# File 'lib/octokit/client/issues.rb', line 91 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 18 |
# File 'lib/octokit/client/issues.rb', line 15 def search_issues(repo, search_term, state='open', ={}) warn 'DEPRECATED: Please use Octokit.list_issues instead.' get("/api/v2/json/issues/search/#{Repository.new(repo)}/#{state}/#{search_term}", , 2)['issues'] end |
#update_comment(repo, number, comment, options = {}) ⇒ Comment
Update a single comment on an issue
157 158 159 |
# File 'lib/octokit/client/issues.rb', line 157 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
107 108 109 |
# File 'lib/octokit/client/issues.rb', line 107 def update_issue(repo, number, title, body, ={}) post("/repos/#{Repository.new(repo)}/issues/#{number}", .merge({:title => title, :body => body}), 3) end |