class Travis::CLI::RepoCommand
def detect_api_endpoint
def detect_api_endpoint if explicit_api_endpoint? || enterprise? repo_config['endpoint'] = api_endpoint elsif ENV['TRAVIS_ENDPOINT'] ENV['TRAVIS_ENDPOINT'] elsif config['default_endpoint'] && config['default_endpoint'] !~ (TRAVIS) repo_config['endpoint'] ||= config['default_endpoint'] else repo_config['endpoint'] ||= begin load_gh GH.head("/repos/#{slug}") Travis::Client::COM_URI rescue GH::Error Travis::Client::COM_URI end end end