Commit 2537a682 authored by Andy Soiron's avatar Andy Soiron

Merge branch 'georgekoltsov/gitlab-migration-update-project-statisticcs' into 'master'

Run `project.after_import` when GitLab Migration is complete

See merge request gitlab-org/gitlab!83966
parents e2f79b5f 7dfc57df
......@@ -1997,7 +1997,7 @@ class Project < ApplicationRecord
# of a model instance (e.g. an Issue).
InternalId.flush_records!(project: self)
import_state.finish
import_state&.finish
update_project_counter_caches
after_create_default_branch
join_pool_repository
......
......@@ -30,6 +30,8 @@ module BulkImports
pipeline_class: self.class.name,
message: "Entity #{entity.status_name}"
)
context.portable.try(:after_import)
end
private
......
......@@ -21,6 +21,8 @@ RSpec.describe BulkImports::Common::Pipelines::EntityFinisher do
)
end
expect(context.portable).to receive(:try).with(:after_import)
expect { subject.run }
.to change(entity, :status_name).to(:finished)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment