diff options
-rw-r--r-- | lib/github/import.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/github/import.rb b/lib/github/import.rb index 8ca7b678633..fa2c6790ba7 100644 --- a/lib/github/import.rb +++ b/lib/github/import.rb @@ -44,13 +44,13 @@ module Github attr_reader :project, :repository, :repo, :repo_url, :wiki_url, :options, :errors, :cached, :verbose - def initialize(project, options) + def initialize(project, options = {}) @project = project @repository = project.repository @repo = project.import_source @repo_url = project.import_url @wiki_url = project.import_url.sub(/\.git\z/, '.wiki.git') - @options = options + @options = options.reverse_merge(token: project.import_data&.credentials&.fetch(:user)) @verbose = options.fetch(:verbose, false) @cached = Hash.new { |hash, key| hash[key] = Hash.new } @errors = [] |