summaryrefslogtreecommitdiff
path: root/app/controllers/import
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/import')
-rw-r--r--app/controllers/import/available_namespaces_controller.rb1
-rw-r--r--app/controllers/import/base_controller.rb1
-rw-r--r--app/controllers/import/bitbucket_controller.rb7
-rw-r--r--app/controllers/import/bitbucket_server_controller.rb7
-rw-r--r--app/controllers/import/bulk_imports_controller.rb3
-rw-r--r--app/controllers/import/fogbugz_controller.rb4
-rw-r--r--app/controllers/import/gitea_controller.rb6
-rw-r--r--app/controllers/import/gitlab_controller.rb3
-rw-r--r--app/controllers/import/gitlab_groups_controller.rb1
-rw-r--r--app/controllers/import/history_controller.rb1
-rw-r--r--app/controllers/import/manifest_controller.rb7
-rw-r--r--app/controllers/import/url_controller.rb1
12 files changed, 23 insertions, 19 deletions
diff --git a/app/controllers/import/available_namespaces_controller.rb b/app/controllers/import/available_namespaces_controller.rb
index 0c2af13d3f3..c16c40cefea 100644
--- a/app/controllers/import/available_namespaces_controller.rb
+++ b/app/controllers/import/available_namespaces_controller.rb
@@ -2,6 +2,7 @@
class Import::AvailableNamespacesController < ApplicationController
feature_category :importers
+ urgency :low
def index
render json: NamespaceSerializer.new.represent(current_user.manageable_groups_with_routes(include_groups_with_developer_maintainer_access: true))
diff --git a/app/controllers/import/base_controller.rb b/app/controllers/import/base_controller.rb
index 51ca12370e6..7ef07032913 100644
--- a/app/controllers/import/base_controller.rb
+++ b/app/controllers/import/base_controller.rb
@@ -5,6 +5,7 @@ class Import::BaseController < ApplicationController
before_action -> { check_rate_limit!(:project_import, scope: [current_user, :project_import], redirect_back: true) }, only: [:create]
feature_category :importers
+ urgency :low
def status
respond_to do |format|
diff --git a/app/controllers/import/bitbucket_controller.rb b/app/controllers/import/bitbucket_controller.rb
index 7c9525d1744..55707000cf8 100644
--- a/app/controllers/import/bitbucket_controller.rb
+++ b/app/controllers/import/bitbucket_controller.rb
@@ -29,13 +29,12 @@ class Import::BitbucketController < Import::BaseController
end
end
+ # We need to re-expose controller's internal method 'status' as action.
+ # rubocop:disable Lint/UselessMethodDefinition
def status
super
end
-
- def realtime_changes
- super
- end
+ # rubocop:enable Lint/UselessMethodDefinition
def create
bitbucket_client = Bitbucket::Client.new(credentials)
diff --git a/app/controllers/import/bitbucket_server_controller.rb b/app/controllers/import/bitbucket_server_controller.rb
index 31e9694ca1d..00f3f0b08b2 100644
--- a/app/controllers/import/bitbucket_server_controller.rb
+++ b/app/controllers/import/bitbucket_server_controller.rb
@@ -52,13 +52,12 @@ class Import::BitbucketServerController < Import::BaseController
redirect_to status_import_bitbucket_server_path
end
+ # We need to re-expose controller's internal method 'status' as action.
+ # rubocop:disable Lint/UselessMethodDefinition
def status
super
end
-
- def realtime_changes
- super
- end
+ # rubocop:enable Lint/UselessMethodDefinition
protected
diff --git a/app/controllers/import/bulk_imports_controller.rb b/app/controllers/import/bulk_imports_controller.rb
index f26c06b7e37..34f12aebb91 100644
--- a/app/controllers/import/bulk_imports_controller.rb
+++ b/app/controllers/import/bulk_imports_controller.rb
@@ -7,6 +7,7 @@ class Import::BulkImportsController < ApplicationController
before_action :verify_blocked_uri, only: :status
feature_category :importers
+ urgency :low
POLLING_INTERVAL = 3_000
@@ -98,7 +99,7 @@ class Import::BulkImportsController < ApplicationController
end
def ensure_group_import_enabled
- render_404 unless Feature.enabled?(:bulk_import, default_enabled: :yaml)
+ render_404 unless Feature.enabled?(:bulk_import)
end
def access_token_key
diff --git a/app/controllers/import/fogbugz_controller.rb b/app/controllers/import/fogbugz_controller.rb
index 377292d47d8..c223d9d211e 100644
--- a/app/controllers/import/fogbugz_controller.rb
+++ b/app/controllers/import/fogbugz_controller.rb
@@ -54,10 +54,6 @@ class Import::FogbugzController < Import::BaseController
end
# rubocop: enable CodeReuse/ActiveRecord
- def realtime_changes
- super
- end
-
def create
repo = client.repo(params[:repo_id])
fb_session = { uri: session[:fogbugz_uri], token: session[:fogbugz_token] }
diff --git a/app/controllers/import/gitea_controller.rb b/app/controllers/import/gitea_controller.rb
index 32c9da67e90..4b4ac07b389 100644
--- a/app/controllers/import/gitea_controller.rb
+++ b/app/controllers/import/gitea_controller.rb
@@ -16,10 +16,12 @@ class Import::GiteaController < Import::GithubController
super
end
- # Must be defined or it will 404
+ # We need to re-expose controller's internal method 'status' as action.
+ # rubocop:disable Lint/UselessMethodDefinition
def status
super
end
+ # rubocop:enable Lint/UselessMethodDefinition
protected
@@ -61,7 +63,7 @@ class Import::GiteaController < Import::GithubController
override :client
def client
- @client ||= Gitlab::LegacyGithubImport::Client.new(session[access_token_key], client_options)
+ @client ||= Gitlab::LegacyGithubImport::Client.new(session[access_token_key], **client_options)
end
override :client_options
diff --git a/app/controllers/import/gitlab_controller.rb b/app/controllers/import/gitlab_controller.rb
index fa9517c3545..c846d9d225a 100644
--- a/app/controllers/import/gitlab_controller.rb
+++ b/app/controllers/import/gitlab_controller.rb
@@ -16,9 +16,12 @@ class Import::GitlabController < Import::BaseController
redirect_to status_import_gitlab_url
end
+ # We need to re-expose controller's internal method 'status' as action.
+ # rubocop:disable Lint/UselessMethodDefinition
def status
super
end
+ # rubocop:enable Lint/UselessMethodDefinition
def create
repo = client.project(params[:repo_id].to_i)
diff --git a/app/controllers/import/gitlab_groups_controller.rb b/app/controllers/import/gitlab_groups_controller.rb
index c9d5e9986dc..81f18a18776 100644
--- a/app/controllers/import/gitlab_groups_controller.rb
+++ b/app/controllers/import/gitlab_groups_controller.rb
@@ -6,6 +6,7 @@ class Import::GitlabGroupsController < ApplicationController
before_action :check_import_rate_limit!, only: %i[create]
feature_category :importers
+ urgency :low
def create
unless file_is_valid?(group_params[:file])
diff --git a/app/controllers/import/history_controller.rb b/app/controllers/import/history_controller.rb
index 69e31392f21..9677624d0b7 100644
--- a/app/controllers/import/history_controller.rb
+++ b/app/controllers/import/history_controller.rb
@@ -2,4 +2,5 @@
class Import::HistoryController < ApplicationController
feature_category :importers
+ urgency :low
end
diff --git a/app/controllers/import/manifest_controller.rb b/app/controllers/import/manifest_controller.rb
index 956d0c9a2ae..461ba982969 100644
--- a/app/controllers/import/manifest_controller.rb
+++ b/app/controllers/import/manifest_controller.rb
@@ -10,9 +10,12 @@ class Import::ManifestController < Import::BaseController
def new
end
+ # We need to re-expose controller's internal method 'status' as action.
+ # rubocop:disable Lint/UselessMethodDefinition
def status
super
end
+ # rubocop:enable Lint/UselessMethodDefinition
def upload
group = Group.find(params[:group_id])
@@ -36,10 +39,6 @@ class Import::ManifestController < Import::BaseController
end
end
- def realtime_changes
- super
- end
-
def create
repository = importable_repos.find do |project|
project[:id] == params[:repo_id].to_i
diff --git a/app/controllers/import/url_controller.rb b/app/controllers/import/url_controller.rb
index 4e4b6ad125e..fed3412881a 100644
--- a/app/controllers/import/url_controller.rb
+++ b/app/controllers/import/url_controller.rb
@@ -2,6 +2,7 @@
class Import::UrlController < ApplicationController
feature_category :importers
+ urgency :low
def validate
result = Import::ValidateRemoteGitEndpointService.new(validate_params).execute