Module: Octokit::Client::Issues
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/issues.rb
Instance Method Summary (collapse)
-
- (Comment) add_comment(repo, number, comment, options = {})
Add a comment to an issue.
-
- (Issue) close_issue(repo, number, options = {})
Close an issue.
-
- (Issue) create_issue(repo, title, body, options = {})
(also: #open_issue)
Create an issue for a repository.
-
- (Boolean) delete_comment(repo, number, options = {})
Delete a single comment.
-
- (Issue) issue(repo, number, options = {})
Get a single issue from a repository.
-
- (Comment) issue_comment(repo, number, options = {})
Get a single comment attached to an issue.
-
- (Array) issue_comments(repo, number, options = {})
Get all comments attached to an issue.
-
- (Event) issue_event(repo, number, options = {})
Get information on a single Issue Event.
-
- (Array) issue_events(repo, number, options = {})
List events for an Issue.
-
- (Array) issues_comments(repo, options = {})
Get all comments attached to issues for the repository.
-
- (Array) list_issues(repository = nil, options = {})
(also: #issues)
List issues for a the authenticated user or repository.
-
- (Array) org_issues(org, options = {})
List all issues for a given organization for the authenticated user.
-
- (Issue) reopen_issue(repo, number, options = {})
Reopen an issue.
-
- (Array) search_issues(repo, search_term, state = 'open', options = {})
Search issues within a repository.
-
- (Comment) update_comment(repo, number, comment, options = {})
Update a single comment on an issue.
-
- (Issue) update_issue(repo, number, title, body, options = {})
Update an issue.
-
- (Array) user_issues(options = {})
List all issues across owned and member repositories for the authenticated user.
Instance Method Details
- (Comment) add_comment(repo, number, comment, options = {})
Add a comment to an issue
228 229 230 |
# File 'lib/octokit/client/issues.rb', line 228 def add_comment(repo, number, comment, ={}) post("repos/#{Repository.new(repo)}/issues/#{number}/comments", .merge({:body => comment})) end |
- (Issue) close_issue(repo, number, options = {})
Close an issue
128 129 130 |
# File 'lib/octokit/client/issues.rb', line 128 def close_issue(repo, number, ={}) patch("repos/#{Repository.new(repo)}/issues/#{number}", .merge({:state => "closed"})) end |
- (Issue) create_issue(repo, title, body, options = {}) Also known as: open_issue
Create an issue for a repository
99 100 101 |
# File 'lib/octokit/client/issues.rb', line 99 def create_issue(repo, title, body, ={}) post("repos/#{Repository.new(repo)}/issues", .merge({:title => title, :body => body})) end |
- (Boolean) delete_comment(repo, number, options = {})
Delete a single comment
253 254 255 |
# File 'lib/octokit/client/issues.rb', line 253 def delete_comment(repo, number, ={}) boolean_from_response(:delete, "repos/#{Repository.new(repo)}/issues/comments/#{number}", ) end |
- (Issue) issue(repo, number, options = {})
Get a single issue from a repository
112 113 114 |
# File 'lib/octokit/client/issues.rb', line 112 def issue(repo, number, ={}) get("repos/#{Repository.new(repo)}/issues/#{number}", ) end |
- (Comment) issue_comment(repo, number, options = {})
Get a single comment attached to an issue
215 216 217 |
# File 'lib/octokit/client/issues.rb', line 215 def issue_comment(repo, number, ={}) get("repos/#{Repository.new(repo)}/issues/comments/#{number}", ) end |
- (Array) issue_comments(repo, number, options = {})
Get all comments attached to an issue
203 204 205 |
# File 'lib/octokit/client/issues.rb', line 203 def issue_comments(repo, number, ={}) get("repos/#{Repository.new(repo)}/issues/#{number}/comments", ) end |
- (Event) issue_event(repo, number, options = {})
Get information on a single Issue Event
279 280 281 |
# File 'lib/octokit/client/issues.rb', line 279 def issue_event(repo, number, ={}) get("repos/#{Repository.new(repo)}/issues/events/#{number}", ) end |
- (Array) issue_events(repo, number, options = {})
List events for an Issue
266 267 268 |
# File 'lib/octokit/client/issues.rb', line 266 def issue_events(repo, number, ={}) get("repos/#{Repository.new(repo)}/issues/#{number}/events", ) end |
- (Array) issues_comments(repo, options = {})
Get all comments attached to issues for the repository
By default, Issue Comments are ordered by ascending ID.
191 192 193 |
# File 'lib/octokit/client/issues.rb', line 191 def issues_comments(repo, ={}) get "/repos/#{Repository.new repo}/issues/comments", end |
- (Array) list_issues(repository = nil, options = {}) Also known as: issues
List issues for a the authenticated user or repository
37 38 39 40 41 42 |
# File 'lib/octokit/client/issues.rb', line 37 def list_issues(repository = nil, ={}) path = '' path = "repos/#{Repository.new(repository)}" if repository path += "/issues" get(path, ) end |
- (Array) org_issues(org, options = {})
List all issues for a given organization for the authenticated user
82 83 84 |
# File 'lib/octokit/client/issues.rb', line 82 def org_issues(org, ={}) get("/orgs/#{org}/issues", ) end |
- (Issue) reopen_issue(repo, number, options = {})
Reopen an issue
144 145 146 |
# File 'lib/octokit/client/issues.rb', line 144 def reopen_issue(repo, number, ={}) patch("repos/#{Repository.new(repo)}/issues/#{number}", .merge({:state => "open"})) end |
- (Array) search_issues(repo, search_term, state = 'open', options = {})
Search issues within a repository
13 14 15 |
# File 'lib/octokit/client/issues.rb', line 13 def search_issues(repo, search_term, state='open', ={}) get("legacy/issues/search/#{Repository.new(repo)}/#{state}/#{search_term}", )['issues'] end |
- (Comment) update_comment(repo, number, comment, options = {})
Update a single comment on an issue
241 242 243 |
# File 'lib/octokit/client/issues.rb', line 241 def update_comment(repo, number, comment, ={}) patch("repos/#{Repository.new(repo)}/issues/comments/#{number}", .merge({:body => comment})) end |
- (Issue) update_issue(repo, number, title, body, options = {})
Update an issue
162 163 164 |
# File 'lib/octokit/client/issues.rb', line 162 def update_issue(repo, number, title, body, ={}) patch("repos/#{Repository.new(repo)}/issues/#{number}", .merge({:title => title, :body => body})) end |
- (Array) user_issues(options = {})
List all issues across owned and member repositories for the authenticated user
61 62 63 |
# File 'lib/octokit/client/issues.rb', line 61 def user_issues(={}) get('/user/issues', ) end |