summaryrefslogtreecommitdiff
path: root/app/controllers/projects_controller.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-02-20 13:49:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-20 13:49:51 +0000
commit71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch)
tree6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /app/controllers/projects_controller.rb
parenta7253423e3403b8c08f8a161e5937e1488f5f407 (diff)
downloadgitlab-ce-71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e.tar.gz
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb18
1 files changed, 16 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index ee2c268ff33..71ad747b6b1 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -45,7 +45,6 @@ class ProjectsController < Projects::ApplicationController
push_force_frontend_feature_flag(:work_items, @project&.work_items_feature_flag_enabled?)
push_force_frontend_feature_flag(:work_items_mvc, @project&.work_items_mvc_feature_flag_enabled?)
push_force_frontend_feature_flag(:work_items_mvc_2, @project&.work_items_mvc_2_feature_flag_enabled?)
- push_frontend_feature_flag(:package_registry_access_level)
end
layout :determine_layout
@@ -223,7 +222,22 @@ class ProjectsController < Projects::ApplicationController
end
def housekeeping
- ::Repositories::HousekeepingService.new(@project, :gc).execute
+ task = if params[:prune].present?
+ :prune
+ else
+ :eager
+ end
+
+ ::Repositories::HousekeepingService.new(@project, task).execute do
+ ::Gitlab::Audit::Auditor.audit(
+ name: 'manually_trigger_housekeeping',
+ author: current_user,
+ scope: @project,
+ target: @project,
+ message: "Housekeeping task: #{task}",
+ created_at: DateTime.current
+ )
+ end
redirect_to(
project_path(@project),