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.
-
#edit_issue(owner, repo, number, options = {}) ⇒ Object
Edit an issue.
-
#issue(owner, repo, number) ⇒ Hash
Get a single issue.
-
#issues(options = {}) ⇒ Array
List all issues for an authenticated user, including owned, member, and org repos.
-
#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 |
#edit_issue(owner, repo, number, options = {}) ⇒ Object
Edit an issue.
Requires authentication.
145 146 147 |
# File 'lib/github_api_v3/client/issues.rb', line 145 def edit_issue(owner, repo, number, ={}) patch "/repos/#{owner}/#{repo}/issues/#{number}", body: 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 |
#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 |
#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 |