diff options
Diffstat (limited to 'app/controllers/import')
6 files changed, 16 insertions, 7 deletions
diff --git a/app/controllers/import/bitbucket_server_controller.rb b/app/controllers/import/bitbucket_server_controller.rb index ba2743e1002..01657df28fd 100644 --- a/app/controllers/import/bitbucket_server_controller.rb +++ b/app/controllers/import/bitbucket_server_controller.rb @@ -49,6 +49,9 @@ class Import::BitbucketServerController < Import::BaseController session[bitbucket_server_username_key] = params[:bitbucket_server_username] session[bitbucket_server_url_key] = params[:bitbucket_server_url] + experiment(:default_to_import_tab, actor: current_user) + .track(:authentication, property: provider_name) + redirect_to status_import_bitbucket_server_path(namespace_id: params[:namespace_id]) end diff --git a/app/controllers/import/bulk_imports_controller.rb b/app/controllers/import/bulk_imports_controller.rb index e211ea70a56..6ff0f55d2f6 100644 --- a/app/controllers/import/bulk_imports_controller.rb +++ b/app/controllers/import/bulk_imports_controller.rb @@ -6,10 +6,6 @@ class Import::BulkImportsController < ApplicationController before_action :ensure_bulk_import_enabled before_action :verify_blocked_uri, only: :status - before_action only: [:history] do - push_frontend_feature_flag(:bulk_import_details_page) - end - feature_category :importers urgency :low @@ -53,9 +49,7 @@ class Import::BulkImportsController < ApplicationController end end - def details - render_404 unless Feature.enabled?(:bulk_import_details_page) - end + def details; end def create return render json: { success: false }, status: :too_many_requests if throttled_request? diff --git a/app/controllers/import/fogbugz_controller.rb b/app/controllers/import/fogbugz_controller.rb index 34fdf513313..05ba317057d 100644 --- a/app/controllers/import/fogbugz_controller.rb +++ b/app/controllers/import/fogbugz_controller.rb @@ -22,6 +22,9 @@ class Import::FogbugzController < Import::BaseController session[:fogbugz_token] = res.get_token.to_s session[:fogbugz_uri] = params[:uri] + experiment(:default_to_import_tab, actor: current_user) + .track(:successfully_authenticated, property: provider_name) + redirect_to new_user_map_import_fogbugz_path(namespace_id: params[:namespace_id]) end diff --git a/app/controllers/import/github_controller.rb b/app/controllers/import/github_controller.rb index 2b72ceceb5a..0159c1913af 100644 --- a/app/controllers/import/github_controller.rb +++ b/app/controllers/import/github_controller.rb @@ -41,6 +41,9 @@ class Import::GithubController < Import::BaseController end def personal_access_token + experiment(:default_to_import_tab, actor: current_user) + .track(:authentication, property: provider_name) + session[access_token_key] = params[:personal_access_token]&.strip redirect_to status_import_url end diff --git a/app/controllers/import/gitlab_projects_controller.rb b/app/controllers/import/gitlab_projects_controller.rb index d1b182a57d8..71d66dc3db8 100644 --- a/app/controllers/import/gitlab_projects_controller.rb +++ b/app/controllers/import/gitlab_projects_controller.rb @@ -21,6 +21,9 @@ class Import::GitlabProjectsController < Import::BaseController @project = ::Projects::GitlabProjectsImportService.new(current_user, project_params).execute if @project.saved? + experiment(:default_to_import_tab, actor: current_user) + .track(:successfully_imported, property: 'gitlab_export') + redirect_to( project_path(@project), notice: _("Project '%{project_name}' is being imported.") % { project_name: @project.name } diff --git a/app/controllers/import/manifest_controller.rb b/app/controllers/import/manifest_controller.rb index 03884717e54..7d3c91a7f5c 100644 --- a/app/controllers/import/manifest_controller.rb +++ b/app/controllers/import/manifest_controller.rb @@ -31,6 +31,9 @@ class Import::ManifestController < Import::BaseController if manifest.valid? manifest_import_metadata.save(manifest.projects, group.id) + experiment(:default_to_import_tab, actor: current_user) + .track(:successfully_imported, property: provider_name) + redirect_to status_import_manifest_path else @errors = manifest.errors |