summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-02-22 15:49:51 +0000
committerRémy Coutable <remy@rymai.me>2017-02-22 15:49:51 +0000
commit91335c59fd3a0a1dc5cd83835d086ac1699316b9 (patch)
tree6a7e1af66666c3e98b81b7945a382dabc8d7ba6c /lib
parent765d509a5bd0548961ea7ab1d86bf9302b5298b1 (diff)
parentd3425933dddf4e849199c06dd3ce00c212d0c6da (diff)
downloadgitlab-ce-91335c59fd3a0a1dc5cd83835d086ac1699316b9.tar.gz
Merge branch '27032-add-a-house-keeping-api-call' into 'master'
Add housekeeping endpoint for Projects API Closes #27032 See merge request !9421
Diffstat (limited to 'lib')
-rw-r--r--lib/api/projects.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 366e5679edd..f1cb1b22143 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -374,6 +374,19 @@ module API
present paginate(users), with: Entities::UserBasic
end
+
+ desc 'Start the housekeeping task for a project' do
+ detail 'This feature was introduced in GitLab 9.0.'
+ end
+ post ':id/housekeeping' do
+ authorize_admin_project
+
+ begin
+ ::Projects::HousekeepingService.new(user_project).execute
+ rescue ::Projects::HousekeepingService::LeaseTaken => error
+ conflict!(error.message)
+ end
+ end
end
end
end