diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-22 20:32:41 +0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2017-02-22 20:32:41 +0300 |
commit | 931db7963ee9fa145d8fe2fb5eea209215227db7 (patch) | |
tree | a85ddfcf479ea09237c54a6ce9b0557925f583ff /lib/api | |
parent | 0b402e11e355dc8d834fbc139f4bca810a9f766e (diff) | |
parent | 33e4294fc884c7bd2a7fb86baf4731daf87db7bb (diff) |
Merge branch 'master' into 'api-notes-entity-fields'
# Conflicts:
# doc/api/v3_to_v4.md
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/projects.rb | 13 |
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 |