Module: LitaGithub::Octo

Overview

Github handler common-use Octokit methods

Instance Method Summary collapse

Instance Method Details

#access_tokenObject

pull the access token from the config



23
24
25
# File 'lib/lita-github/octo.rb', line 23

def access_token
  config.access_token
end

#octoObject

object access method for Octokit client



34
35
36
# File 'lib/lita-github/octo.rb', line 34

def octo
  @@octo
end

#setup_octo(_) ⇒ Object

set up the Octokit client



28
29
30
31
# File 'lib/lita-github/octo.rb', line 28

def setup_octo(_)
  @@octo ||= Octokit::Client.new(access_token: access_token)
  @@octo.auto_paginate = true
end