diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 202bae458..0b861655e 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -253,6 +253,7 @@ class ProjectsController < ApplicationController def destroy if current_user.admin? || @project.manager?(current_user) ActiveRecord::Base.transaction do + UserAction.create(action_id: @project.id, action_type: "DestroyProject", user_id: current_user.id, :ip => request.remote_ip, data_bank: @project.attributes.to_json) close_fork_pull_requests_by(@project) Gitea::Repository::DeleteService.new(@project.owner, @project.identifier,current_user.gitea_token).call @project.destroy!