Method: GitHubService::Configuration#api_endpoint
- Defined in:
- lib/git-process/github_configuration.rb
#api_endpoint(base_url = nil) ⇒ String
Determines the URL used for using the GitHub REST interface based on a “base” URL.
If the “base_url” is not provided, then it assumes that this object has a “remote_name” property that it can ask.
122 123 124 125 126 127 128 129 |
# File 'lib/git-process/github_configuration.rb', line 122 def api_endpoint(base_url = nil) base_url ||= base_github_api_url_for_remote if /github.com/ !~ base_url "#{base_url}/api/v3" else Octokit::Configuration::DEFAULT_API_ENDPOINT end end |