summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export/relation_factory.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/import_export/relation_factory.rb')
-rw-r--r--lib/gitlab/import_export/relation_factory.rb23
1 files changed, 15 insertions, 8 deletions
diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb
index 9dd30803196..9a5e01462fb 100644
--- a/lib/gitlab/import_export/relation_factory.rb
+++ b/lib/gitlab/import_export/relation_factory.rb
@@ -40,7 +40,21 @@ module Gitlab
IMPORTED_OBJECT_MAX_RETRIES = 5.freeze
- EXISTING_OBJECT_CHECK = %i[milestone milestones label labels project_label project_labels group_label group_labels project_feature merge_request ProjectCiCdSetting container_expiration_policy].freeze
+ EXISTING_OBJECT_CHECK = %i[
+ milestone
+ milestones
+ label
+ labels
+ project_label
+ project_labels
+ group_label
+ group_labels
+ project_feature
+ merge_request
+ epic
+ ProjectCiCdSetting
+ container_expiration_policy
+ ].freeze
TOKEN_RESET_MODELS = %i[Project Namespace Ci::Trigger Ci::Build Ci::Runner ProjectHook].freeze
@@ -86,9 +100,6 @@ module Gitlab
def create
return if unknown_service?
- # Do not import legacy triggers
- return if !Feature.enabled?(:use_legacy_pipeline_triggers, @project) && legacy_trigger?
-
setup_models
object = generate_imported_object
@@ -345,10 +356,6 @@ module Gitlab
!Object.const_defined?(parsed_relation_hash['type'])
end
- def legacy_trigger?
- @relation_name == :'Ci::Trigger' && @relation_hash['owner_id'].nil?
- end
-
def find_or_create_object!
if UNIQUE_RELATIONS.include?(@relation_name)
unique_relation_object = relation_class.find_or_create_by(project_id: @project.id)