Module: GitHub::Client::Issues
- Included in:
- GitHub::Client
- Defined in:
- lib/github_api_v3/client/issues.rb
Overview
Methods for the Issues API.
Instance Method Summary collapse
-
#create_issue(owner, repo, title, options = {}) ⇒ Hash
Create an issue.
-
#create_issue_comment(owner, repo, number, comment) ⇒ Hash
Create a new issue comment.
-
#delete_issue_comment(owner, repo, id) ⇒ Boolean
Delete a comment.
-
#edit_issue(owner, repo, number, options = {}) ⇒ Hash
Edit an issue.
-
#edit_issue_comment(owner, repo, id, comment) ⇒ Hash
Edit an issue comment.
-
#issue(owner, repo, number) ⇒ Hash
Get a single issue.
-
#issue_comment(owner, repo, id) ⇒ Hash
Get a single issue comment.
-
#issue_comments(owner, repo, number) ⇒ Array
List comments on an issue.
-
#issue_event(owner, repo, id) ⇒ Object
Get a single issue event.
-
#issue_events(owner, repo, number) ⇒ Array
List events for an issue.
-
#issues(options = {}) ⇒ Array
List all issues for an authenticated user, including owned, member, and org repos.
-
#issues_comments(owner, repo) ⇒ Array
List all issues comments for a repository.
-
#org_issues(org, options = {}) ⇒ Array
List all issues for a given organization for the authenticated user.
-
#repo_issues(owner, repo, options = {}) ⇒ Array
List issues for a repository.
-
#user_issues(options = {}) ⇒ Array
List all issues across owned and member repositories for the authenticated user.
Instance Method Details
#create_issue(owner, repo, title, options = {}) ⇒ Hash
Create an issue.
Requires authentication.
123 124 125 126 |
# File 'lib/github_api_v3/client/issues.rb', line 123 def create_issue(owner, repo, title, ={}) .merge!(title: title) post "/repos/#{owner}/#{repo}/issues", body: end |
#create_issue_comment(owner, repo, number, comment) ⇒ Hash
Create a new issue comment.
190 191 192 |
# File 'lib/github_api_v3/client/issues.rb', line 190 def create_issue_comment(owner, repo, number, comment) post "/repos/#{owner}/#{repo}/issues/#{number}/comments", body: { body: comment } end |
#delete_issue_comment(owner, repo, id) ⇒ Boolean
Delete a comment.
213 214 215 |
# File 'lib/github_api_v3/client/issues.rb', line 213 def delete_issue_comment(owner, repo, id) boolean_request :delete, "/repos/#{owner}/#{repo}/issues/comments/#{id}" end |
#edit_issue(owner, repo, number, options = {}) ⇒ Hash
Edit an issue.
Requires authentication.
146 147 148 |
# File 'lib/github_api_v3/client/issues.rb', line 146 def edit_issue(owner, repo, number, ={}) patch "/repos/#{owner}/#{repo}/issues/#{number}", body: end |
#edit_issue_comment(owner, repo, id, comment) ⇒ Hash
Edit an issue comment.
202 203 204 |
# File 'lib/github_api_v3/client/issues.rb', line 202 def edit_issue_comment(owner, repo, id, comment) patch "/repos/#{owner}/#{repo}/issues/comments/#{id}", body: { body: comment } end |
#issue(owner, repo, number) ⇒ Hash
Get a single issue.
103 104 105 |
# File 'lib/github_api_v3/client/issues.rb', line 103 def issue(owner, repo, number) get "/repos/#{owner}/#{repo}/issues/#{number}" end |
#issue_comment(owner, repo, id) ⇒ Hash
Get a single issue comment.
178 179 180 |
# File 'lib/github_api_v3/client/issues.rb', line 178 def issue_comment(owner, repo, id) get "/repos/#{owner}/#{repo}/issues/comments/#{id}" end |
#issue_comments(owner, repo, number) ⇒ Array
List comments on an issue.
157 158 159 |
# File 'lib/github_api_v3/client/issues.rb', line 157 def issue_comments(owner, repo, number) get "/repos/#{owner}/#{repo}/issues/#{number}/comments" end |
#issue_event(owner, repo, id) ⇒ Object
Get a single issue event.
234 235 236 |
# File 'lib/github_api_v3/client/issues.rb', line 234 def issue_event(owner, repo, id) get "/repos/#{owner}/#{repo}/issues/events/#{id}" end |
#issue_events(owner, repo, number) ⇒ Array
List events for an issue.
224 225 226 |
# File 'lib/github_api_v3/client/issues.rb', line 224 def issue_events(owner, repo, number) get "/repos/#{owner}/#{repo}/issues/#{number}/events" end |
#issues(options = {}) ⇒ Array
List all issues for an authenticated user, including owned, member, and org repos.
Requires authentication.
24 25 26 |
# File 'lib/github_api_v3/client/issues.rb', line 24 def issues(={}) get '/issues', params: end |
#issues_comments(owner, repo) ⇒ Array
List all issues comments for a repository.
167 168 169 |
# File 'lib/github_api_v3/client/issues.rb', line 167 def issues_comments(owner, repo) get "/repos/#{owner}/#{repo}/issues/comments" end |
#org_issues(org, options = {}) ⇒ Array
List all issues for a given organization for the authenticated user.
Requires authentication.
63 64 65 |
# File 'lib/github_api_v3/client/issues.rb', line 63 def org_issues(org, ={}) get "/orgs/#{org}/issues", params: end |
#repo_issues(owner, repo, options = {}) ⇒ Array
List issues for a repository.
90 91 92 |
# File 'lib/github_api_v3/client/issues.rb', line 90 def repo_issues(owner, repo, ={}) get "/repos/#{owner}/#{repo}/issues" end |
#user_issues(options = {}) ⇒ Array
List all issues across owned and member repositories for the authenticated user.
Requires authentication.
43 44 45 |
# File 'lib/github_api_v3/client/issues.rb', line 43 def user_issues(={}) get '/user/issues', params: end |