diff options
Diffstat (limited to 'lib/gitlab/import_export/project/relation_factory.rb')
-rw-r--r-- | lib/gitlab/import_export/project/relation_factory.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/gitlab/import_export/project/relation_factory.rb b/lib/gitlab/import_export/project/relation_factory.rb index 8110720fb46..c4b0e24e34a 100644 --- a/lib/gitlab/import_export/project/relation_factory.rb +++ b/lib/gitlab/import_export/project/relation_factory.rb @@ -89,6 +89,7 @@ module Gitlab when :'Ci::PipelineSchedule' then setup_pipeline_schedule when :'ProtectedBranch::MergeAccessLevel' then setup_protected_branch_access_level when :'ProtectedBranch::PushAccessLevel' then setup_protected_branch_access_level + when :releases then setup_release end update_project_references @@ -133,7 +134,7 @@ module Gitlab end def setup_diff - diff = @relation_hash.delete('utf8_diff') + diff = @relation_hash.delete('diff_export') || @relation_hash.delete('utf8_diff') parsed_relation_hash['diff'] = diff end @@ -150,6 +151,14 @@ module Gitlab @relation_hash['relative_position'] = compute_relative_position end + def setup_release + # When author is not present for source release set the author as ghost user. + + if @relation_hash['author_id'].blank? + @relation_hash['author_id'] = User.select(:id).ghost.id + end + end + def setup_pipeline_schedule @relation_hash['active'] = false end |