class Travis::CLI::ApiCommand

def load_gh

def load_gh
  gh_config       = session.config['github']
  gh_config     &&= gh_config.inject({}) { |h, (k, v)| h.update(k.to_sym => v) }
  gh_config     ||= {}
  gh_config[:ssl] = Travis::Client::Session::SSL_OPTIONS
  gh_config[:ssl] = { verify: false } if gh_config[:api_url] && gh_config[:api_url] != 'https://api.github.com'
  gh_config.delete :scopes
  if debug?
    gh_config[:instrumenter] = proc do |type, payload, &block|
      next block.call unless type == 'http.gh'
      time("GitHub API: #{payload[:verb].to_s.upcase} #{payload[:url]}", block)
    end
  end
  GH.set(gh_config)
end