diff options
author | Marcia Ramos <virtua.creative@gmail.com> | 2018-03-09 12:36:26 -0300 |
---|---|---|
committer | Marcia Ramos <virtua.creative@gmail.com> | 2018-03-09 12:36:26 -0300 |
commit | 5596933b535d632cf3c8159889a72b1e98e4ec0a (patch) | |
tree | 5edc39c0408a1e5bcbc13168dedbdabd1eba417f /app/controllers/import | |
parent | da5694c5cbaf62d5568339efd1a6f340f97e6e53 (diff) | |
parent | 3bbe60f8e802ce3d9da060a47b7f635dedba7370 (diff) | |
download | gitlab-ce-docs-refactor-dev-guides.tar.gz |
fix conflictdocs-refactor-dev-guides
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 |