Skip to content

Commit

Permalink
Merge pull request github-changelog-generator#455 from eliperkins/fix…
Browse files Browse the repository at this point in the history
…-enterprise

Use Octokit::Client for both .com and Enterprise
  • Loading branch information
olleolleolle authored Nov 22, 2016
2 parents 88cbcd2 + 881ecc1 commit 9c0f7c7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/github_changelog_generator/octo_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class OctoFetcher
# @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_log If using http_cache, this is the cache log file path
def initialize(options = {}) # rubocop:disable Metrics/CyclomaticComplexity
def initialize(options = {})
@options = options || {}
@user = @options[:user]
@project = @options[:project]
Expand All @@ -40,8 +40,7 @@ def initialize(options = {}) # rubocop:disable Metrics/CyclomaticComplexity
@github_options[:access_token] = @github_token unless @github_token.nil?
@github_options[:api_endpoint] = @options[:github_endpoint] unless @options[:github_endpoint].nil?

client_type = @options[:github_endpoint].nil? ? Octokit::Client : Octokit::EnterpriseAdminClient
@client = client_type.new(@github_options)
@client = Octokit::Client.new(@github_options)
end

def init_cache
Expand Down

0 comments on commit 9c0f7c7

Please sign in to comment.