Class: Lita::GithubPrList::PullRequest
- Inherits:
-
Object
- Object
- Lita::GithubPrList::PullRequest
- Defined in:
- lib/lita/github_pr_list/pull_request.rb
Instance Attribute Summary collapse
-
#github_client ⇒ Object
Returns the value of attribute github_client.
-
#github_organization ⇒ Object
Returns the value of attribute github_organization.
-
#github_pull_requests ⇒ Object
Returns the value of attribute github_pull_requests.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ PullRequest
constructor
A new instance of PullRequest.
- #list ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ PullRequest
Returns a new instance of PullRequest.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/lita/github_pr_list/pull_request.rb', line 8 def initialize(params = {}) self.response = params.fetch(:response, nil) github_token = params.fetch(:github_token, nil) self.github_organization = params.fetch(:github_organization, nil) self.github_pull_requests = [] raise "invalid params in #{self.class.name}" if response.nil? || github_token.nil? || github_organization.nil? self.github_client = Octokit::Client.new(access_token: github_token, auto_paginate: true) end |
Instance Attribute Details
#github_client ⇒ Object
Returns the value of attribute github_client.
6 7 8 |
# File 'lib/lita/github_pr_list/pull_request.rb', line 6 def github_client @github_client end |
#github_organization ⇒ Object
Returns the value of attribute github_organization.
6 7 8 |
# File 'lib/lita/github_pr_list/pull_request.rb', line 6 def github_organization @github_organization end |
#github_pull_requests ⇒ Object
Returns the value of attribute github_pull_requests.
6 7 8 |
# File 'lib/lita/github_pr_list/pull_request.rb', line 6 def github_pull_requests @github_pull_requests end |
#response ⇒ Object
Returns the value of attribute response.
6 7 8 |
# File 'lib/lita/github_pr_list/pull_request.rb', line 6 def response @response end |
Instance Method Details
#list ⇒ Object
19 20 21 22 |
# File 'lib/lita/github_pr_list/pull_request.rb', line 19 def list get_pull_requests build_summary end |