Class: Utils::Github::OctokitClient
- Inherits:
-
Object
- Object
- Utils::Github::OctokitClient
- Defined in:
- lib/bas/utils/github/octokit_client.rb
Overview
This module is a Github utility for making requests to the Github API using the octokit module
Instance Method Summary collapse
-
#execute ⇒ Object
Build the octokit client using a Github app access token.
-
#initialize(params) ⇒ OctokitClient
constructor
A new instance of OctokitClient.
- #repository_info(repo) ⇒ Object
Constructor Details
#initialize(params) ⇒ OctokitClient
Returns a new instance of OctokitClient.
13 14 15 |
# File 'lib/bas/utils/github/octokit_client.rb', line 13 def initialize(params) @params = params end |
Instance Method Details
#execute ⇒ Object
Build the octokit client using a Github app access token
19 20 21 22 23 |
# File 'lib/bas/utils/github/octokit_client.rb', line 19 def execute { client: octokit } rescue StandardError => e { error: e.to_s } end |
#repository_info(repo) ⇒ Object
25 26 27 28 29 |
# File 'lib/bas/utils/github/octokit_client.rb', line 25 def repository_info(repo) octokit.repository(repo) rescue StandardError => e { error: e.to_s } end |