diff options
Diffstat (limited to 'app/controllers/import')
-rw-r--r-- | app/controllers/import/bitbucket_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/import/github_controller.rb | 18 |
2 files changed, 15 insertions, 5 deletions
diff --git a/app/controllers/import/bitbucket_controller.rb b/app/controllers/import/bitbucket_controller.rb index 13ea736688d..61d81ad8a71 100644 --- a/app/controllers/import/bitbucket_controller.rb +++ b/app/controllers/import/bitbucket_controller.rb @@ -71,7 +71,7 @@ class Import::BitbucketController < Import::BaseController end def provider - Gitlab::OAuth::Provider.config_for('bitbucket') + Gitlab::Auth::OAuth::Provider.config_for('bitbucket') end def options diff --git a/app/controllers/import/github_controller.rb b/app/controllers/import/github_controller.rb index 69fb8121ded..eb7d5fca367 100644 --- a/app/controllers/import/github_controller.rb +++ b/app/controllers/import/github_controller.rb @@ -42,7 +42,9 @@ class Import::GithubController < Import::BaseController target_namespace = find_or_create_namespace(namespace_path, current_user.namespace_path) if can?(current_user, :create_projects, target_namespace) - project = Gitlab::LegacyGithubImport::ProjectCreator.new(repo, project_name, target_namespace, current_user, access_params, type: provider).execute + project = Gitlab::LegacyGithubImport::ProjectCreator + .new(repo, project_name, target_namespace, current_user, access_params, type: provider) + .execute(extra_project_attrs) if project.persisted? render json: ProjectSerializer.new.represent(project) @@ -73,15 +75,15 @@ class Import::GithubController < Import::BaseController end def new_import_url - public_send("new_import_#{provider}_url") # rubocop:disable GitlabSecurity/PublicSend + public_send("new_import_#{provider}_url", extra_import_params) # rubocop:disable GitlabSecurity/PublicSend end def status_import_url - public_send("status_import_#{provider}_url") # rubocop:disable GitlabSecurity/PublicSend + public_send("status_import_#{provider}_url", extra_import_params) # rubocop:disable GitlabSecurity/PublicSend end def callback_import_url - public_send("callback_import_#{provider}_url") # rubocop:disable GitlabSecurity/PublicSend + public_send("callback_import_#{provider}_url", extra_import_params) # rubocop:disable GitlabSecurity/PublicSend end def provider_unauthorized @@ -116,4 +118,12 @@ class Import::GithubController < Import::BaseController def client_options {} end + + def extra_project_attrs + {} + end + + def extra_import_params + {} + end end |