diff options
Diffstat (limited to 'lib/gitlab/github_import.rb')
-rw-r--r-- | lib/gitlab/github_import.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/gitlab/github_import.rb b/lib/gitlab/github_import.rb index d48b25842b3..31fe2461e86 100644 --- a/lib/gitlab/github_import.rb +++ b/lib/gitlab/github_import.rb @@ -8,18 +8,12 @@ module Gitlab def self.new_client_for(project, token: nil, host: nil, parallel: true) token_to_use = token || project.import_data&.credentials&.fetch(:user) - token_pool = project.import_data&.credentials&.dig(:additional_access_tokens) - options = { + Client.new( + token_to_use, host: host.presence || self.formatted_import_url(project), per_page: self.per_page(project), parallel: parallel - } - - if token_pool - ClientPool.new(token_pool: token_pool.append(token_to_use), **options) - else - Client.new(token_to_use, **options) - end + ) end # Returns the ID of the ghost user. |