Module: LitaGithub::Octo
- Included in:
- Lita::Handlers::Github, Lita::Handlers::GithubIssues, Lita::Handlers::GithubOrg, Lita::Handlers::GithubPR, Lita::Handlers::GithubRepo
- Defined in:
- lib/lita-github/octo.rb
Overview
Github handler common-use Octokit methods
Instance Method Summary collapse
-
#access_token ⇒ String
Accessor method for the Github access token in the config.
-
#octo ⇒ Octokit::Client
Object access method for Octokit client.
-
#setup_octo(_) ⇒ NilClass
To be used to set up Octokit::Client when loading the Handler class.
Instance Method Details
#access_token ⇒ String
Accessor method for the Github access token in the config
28 29 30 |
# File 'lib/lita-github/octo.rb', line 28 def access_token config.access_token end |
#octo ⇒ Octokit::Client
Object access method for Octokit client
48 49 50 |
# File 'lib/lita-github/octo.rb', line 48 def octo @@octo end |
#setup_octo(_) ⇒ NilClass
To be used to set up Octokit::Client when loading the Handler class
36 37 38 39 40 |
# File 'lib/lita-github/octo.rb', line 36 def setup_octo(_) @@octo ||= Octokit::Client.new(access_token: access_token) @@octo.auto_paginate = true nil end |