diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /lib/api/import_github.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'lib/api/import_github.rb')
-rw-r--r-- | lib/api/import_github.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/api/import_github.rb b/lib/api/import_github.rb index c91a7700f58..46ca8e4c428 100644 --- a/lib/api/import_github.rb +++ b/lib/api/import_github.rb @@ -3,19 +3,16 @@ module API class ImportGithub < ::API::Base feature_category :importers + urgency :low rescue_from Octokit::Unauthorized, with: :provider_unauthorized - before do - forbidden! unless Gitlab::CurrentSettings.import_sources&.include?('github') - end - helpers do def client @client ||= if Feature.enabled?(:remove_legacy_github_client) Gitlab::GithubImport::Client.new(params[:personal_access_token], host: params[:github_hostname]) else - Gitlab::LegacyGithubImport::Client.new(params[:personal_access_token], client_options) + Gitlab::LegacyGithubImport::Client.new(params[:personal_access_token], **client_options) end end |