Merge pull request #455 from eliperkins/fix-enterprise
Use Octokit::Client for both .com and Enterprise
This commit is contained in:
commit
9c0f7c723f
|
@ -23,7 +23,7 @@ module GitHubChangelogGenerator
|
||||||
# @option options [Boolean] :http_cache Use ActiveSupport::Cache::FileStore to cache http requests
|
# @option options [Boolean] :http_cache Use ActiveSupport::Cache::FileStore to cache http requests
|
||||||
# @option options [Boolean] :cache_file If using http_cache, this is the cache file path
|
# @option options [Boolean] :cache_file If using http_cache, this is the cache file path
|
||||||
# @option options [Boolean] :cache_log If using http_cache, this is the cache log file path
|
# @option options [Boolean] :cache_log If using http_cache, this is the cache log file path
|
||||||
def initialize(options = {}) # rubocop:disable Metrics/CyclomaticComplexity
|
def initialize(options = {})
|
||||||
@options = options || {}
|
@options = options || {}
|
||||||
@user = @options[:user]
|
@user = @options[:user]
|
||||||
@project = @options[:project]
|
@project = @options[:project]
|
||||||
|
@ -40,8 +40,7 @@ module GitHubChangelogGenerator
|
||||||
@github_options[:access_token] = @github_token unless @github_token.nil?
|
@github_options[:access_token] = @github_token unless @github_token.nil?
|
||||||
@github_options[:api_endpoint] = @options[:github_endpoint] unless @options[:github_endpoint].nil?
|
@github_options[:api_endpoint] = @options[:github_endpoint] unless @options[:github_endpoint].nil?
|
||||||
|
|
||||||
client_type = @options[:github_endpoint].nil? ? Octokit::Client : Octokit::EnterpriseAdminClient
|
@client = Octokit::Client.new(@github_options)
|
||||||
@client = client_type.new(@github_options)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def init_cache
|
def init_cache
|
||||||
|
|
Loading…
Reference in New Issue
Block a user