summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-26 18:06:29 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-26 18:06:29 +0000
commite66d6781ef36e39d15b1b9bc84cc30e87969edad (patch)
tree0165ff173dee501a55115d605dd8fa8a09f8d313 /app/controllers
parent4e9f718e190a944c39fda2a178eb8b901e7e6ec7 (diff)
downloadgitlab-ce-e66d6781ef36e39d15b1b9bc84cc30e87969edad.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/import/bitbucket_controller.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/import/bitbucket_controller.rb b/app/controllers/import/bitbucket_controller.rb
index 293d76ea765..c37e799de62 100644
--- a/app/controllers/import/bitbucket_controller.rb
+++ b/app/controllers/import/bitbucket_controller.rb
@@ -1,6 +1,8 @@
# frozen_string_literal: true
class Import::BitbucketController < Import::BaseController
+ include ActionView::Helpers::SanitizeHelper
+
before_action :verify_bitbucket_import_enabled
before_action :bitbucket_auth, except: :callback
@@ -21,7 +23,7 @@ class Import::BitbucketController < Import::BaseController
# rubocop: disable CodeReuse/ActiveRecord
def status
bitbucket_client = Bitbucket::Client.new(credentials)
- repos = bitbucket_client.repos
+ repos = bitbucket_client.repos(filter: sanitized_filter_param)
@repos, @incompatible_repos = repos.partition { |repo| repo.valid? }
@@ -104,4 +106,8 @@ class Import::BitbucketController < Import::BaseController
refresh_token: session[:bitbucket_refresh_token]
}
end
+
+ def sanitized_filter_param
+ @filter ||= sanitize(params[:filter])
+ end
end