Class: Decidim::GithubManager::Querier::RelatedIssues
- Defined in:
- lib/decidim/github_manager/querier/related_issues.rb
Overview
Makes a GET request for the related issues of an Issue or Pull Request in GitHub Uses the Timeline events API endpoint
Instance Method Summary collapse
-
#call ⇒ Hash
Makes the GET request and parses the response of an Issue or Pull Request in GitHub.
-
#initialize(issue_id:, token:) ⇒ RelatedIssues
constructor
A new instance of RelatedIssues.
Constructor Details
#initialize(issue_id:, token:) ⇒ RelatedIssues
Returns a new instance of RelatedIssues.
13 14 15 16 |
# File 'lib/decidim/github_manager/querier/related_issues.rb', line 13 def initialize(issue_id:, token:) @issue_id = issue_id @token = token end |
Instance Method Details
#call ⇒ Hash
Makes the GET request and parses the response of an Issue or Pull Request in GitHub
21 22 23 |
# File 'lib/decidim/github_manager/querier/related_issues.rb', line 21 def call parse(json_response("https://api.github.com/repos/decidim/decidim/issues/#{@issue_id}/timeline")) end |