diff options
Diffstat (limited to 'app/services/projects/after_rename_service.rb')
-rw-r--r-- | app/services/projects/after_rename_service.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/services/projects/after_rename_service.rb b/app/services/projects/after_rename_service.rb index 2ed4346e5ca..9dc957b5be2 100644 --- a/app/services/projects/after_rename_service.rb +++ b/app/services/projects/after_rename_service.rb @@ -46,6 +46,7 @@ module Projects update_repository_configuration rename_transferred_documents log_completion + publish_event end def first_ensure_no_registry_tags_are_present @@ -132,6 +133,18 @@ module Projects raise RenameFailedError, error end + + def publish_event + event = Projects::ProjectPathChangedEvent.new(data: { + project_id: project.id, + namespace_id: project.namespace_id, + root_namespace_id: project.root_namespace.id, + old_path: full_path_before, + new_path: full_path_after + }) + + Gitlab::EventStore.publish(event) + end end end |