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 = nil, options = {}) ⇒ Array
(also: #issues)
List issues for a the authenticated user or 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
149 150 151 |
# File 'lib/octokit/client/issues.rb', line 149 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
82 83 84 |
# File 'lib/octokit/client/issues.rb', line 82 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
55 56 57 |
# File 'lib/octokit/client/issues.rb', line 55 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
174 175 176 |
# File 'lib/octokit/client/issues.rb', line 174 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
68 69 70 |
# File 'lib/octokit/client/issues.rb', line 68 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
136 137 138 |
# File 'lib/octokit/client/issues.rb', line 136 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
124 125 126 |
# File 'lib/octokit/client/issues.rb', line 124 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
201 202 203 |
# File 'lib/octokit/client/issues.rb', line 201 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
188 189 190 |
# File 'lib/octokit/client/issues.rb', line 188 def issue_events(repo, number, ={}) get("repos/#{Repository.new(repo)}/issues/#{number}/events", , 3) end |
#list_issues(repository = nil, options = {}) ⇒ Array Also known as: issues
List issues for a the authenticated user or repository
38 39 40 41 42 43 |
# File 'lib/octokit/client/issues.rb', line 38 def list_issues(repository = nil, ={}) path = '' path = "repos/#{Repository.new(repository)}" if repository path += "/issues" get(path, , 3) end |
#reopen_issue(repo, number, options = {}) ⇒ Issue
This implementation needs to be adjusted with switch to API v3
Reopen an issue
96 97 98 |
# File 'lib/octokit/client/issues.rb', line 96 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("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
162 163 164 |
# File 'lib/octokit/client/issues.rb', line 162 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
112 113 114 |
# File 'lib/octokit/client/issues.rb', line 112 def update_issue(repo, number, title, body, ={}) post("repos/#{Repository.new(repo)}/issues/#{number}", .merge({:title => title, :body => body}), 3) end |