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
Search issues within a repository.
-
#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
142 143 144 |
# File 'lib/octokit/client/issues.rb', line 142 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
75 76 77 |
# File 'lib/octokit/client/issues.rb', line 75 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
48 49 50 |
# File 'lib/octokit/client/issues.rb', line 48 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
167 168 169 |
# File 'lib/octokit/client/issues.rb', line 167 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
61 62 63 |
# File 'lib/octokit/client/issues.rb', line 61 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
129 130 131 |
# File 'lib/octokit/client/issues.rb', line 129 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
117 118 119 |
# File 'lib/octokit/client/issues.rb', line 117 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
194 195 196 |
# File 'lib/octokit/client/issues.rb', line 194 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
181 182 183 |
# File 'lib/octokit/client/issues.rb', line 181 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
34 35 36 |
# File 'lib/octokit/client/issues.rb', line 34 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
89 90 91 |
# File 'lib/octokit/client/issues.rb', line 89 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
Search issues within a repository
14 15 16 |
# File 'lib/octokit/client/issues.rb', line 14 def search_issues(repo, search_term, state='open', ={}) 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
155 156 157 |
# File 'lib/octokit/client/issues.rb', line 155 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
105 106 107 |
# File 'lib/octokit/client/issues.rb', line 105 def update_issue(repo, number, title, body, ={}) post("/repos/#{Repository.new(repo)}/issues/#{number}", .merge({:title => title, :body => body}), 3) end |