Sha256: dce5346f8607ef711dfa175fcb6ea89ffc81aa51151bb1a714da464fc0510f6c

Contents?: true

Size: 502 Bytes

Versions: 1

Compression:

Stored size: 502 Bytes

Contents

module Lita::Extensions
  module GitHubWebHooksCore::Hooks::RepoHooks
    def repository
      payload["repository"]
    end
  
    def repo
      repository["full_name"]
    end
    
    def client
      client = Octokit::Client.new(access_token: access_token)      
    end
    
    def access_token
      t = ENV["GITHUB_ACCESS_TOKEN"]
      if t.nil?
        raise ArgumentError.new("Configure your GitHub API use via the GITHUB_ACCESS_TOKEN env variable")
      end
      t
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lita-github-web-hooks-core-1.0.0 lib/lita/extensions/github_web_hooks_core/hooks/repo_hooks.rb