diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-30 15:43:32 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-30 15:46:36 +0200 |
commit | 7e0eb486ed150c0447bf245bdebe250f1771f7dc (patch) | |
tree | 43480d468a2ad7ed624d67523fbed40f6b5a3e6a /lib/api | |
parent | 39a55bdf1a1613f362bcd7da444b291210454160 (diff) | |
download | gitlab-ce-7e0eb486ed150c0447bf245bdebe250f1771f7dc.tar.gz |
Don't allow a merge request to be merged when its title starts with "WIP".
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/merge_requests.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb index f3765f5ab03..b252c57faed 100644 --- a/lib/api/merge_requests.rb +++ b/lib/api/merge_requests.rb @@ -186,7 +186,7 @@ module API merge_request.check_if_can_be_merged end - if merge_request.open? + if merge_request.open? && !merge_request.work_in_progress? if merge_request.can_be_merged? merge_request.automerge!(current_user, params[:merge_commit_message] || merge_request.merge_commit_message) present merge_request, with: Entities::MergeRequest @@ -195,7 +195,7 @@ module API end else # Merge request can not be merged - # because it is already closed/merged + # because it is already closed/merged or marked as WIP not_allowed! end else |