Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/bulk_imports/create_service.rb')
-rw-r--r--app/services/bulk_imports/create_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/bulk_imports/create_service.rb b/app/services/bulk_imports/create_service.rb
index 636c636255f..7fc3511a253 100644
--- a/app/services/bulk_imports/create_service.rb
+++ b/app/services/bulk_imports/create_service.rb
@@ -105,7 +105,7 @@ module BulkImports
def validate_setting_enabled!
source_full_path, source_type = Array.wrap(params)[0].values_at(:source_full_path, :source_type)
entity_type = ENTITY_TYPES_MAPPING.fetch(source_type)
- if source_full_path =~ /^[0-9]+$/
+ if /^[0-9]+$/.match?(source_full_path)
query = query_type(entity_type)
response = graphql_client.execute(
graphql_client.parse(query.to_s),
@@ -154,7 +154,7 @@ module BulkImports
end
def validate_destination_slug(destination_slug)
- return if destination_slug =~ Gitlab::Regex.oci_repository_path_regex
+ return if Gitlab::Regex.oci_repository_path_regex.match?(destination_slug)
raise BulkImports::Error.destination_slug_validation_failure
end