summaryrefslogtreecommitdiff
path: root/app/services/merge_requests
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-08-30 17:43:15 +0000
committerDouwe Maan <douwe@gitlab.com>2016-08-30 17:43:15 +0000
commit4bbe5ce622eafc886c3c6732bb5e7b39d1d7a351 (patch)
tree26140eea3f8060f8cf6a2a15a71ae4aa8a6ab802 /app/services/merge_requests
parentf81e527677ae74373ae2f00c37a84120d4e40dd9 (diff)
parent2d8d94a788eb0bf3885ee67bda9638556425fa4b (diff)
downloadgitlab-ce-4bbe5ce622eafc886c3c6732bb5e7b39d1d7a351.tar.gz
Merge branch '19315-can-edit-merge-request-with-deleted-fork' into 'master'
User can edit closed MR with deleted fork ## What does this MR do? User can edit closed MR with deleted fork (can't change "Target branch"). When fork is deleted "Reopen" button is hidden. ## What are the relevant issue numbers? Closes #19315 ## Screenshots (if relevant) * hidden Reopen button and information about deleted fork ![Zrzut_ekranu_2016-08-12_o_13.19.24](/uploads/d288c5625e788382e31b2979acb601df/Zrzut_ekranu_2016-08-12_o_13.19.24.png) * editable fields for closed MR without fork ![Zrzut_ekranu_2016-08-05_o_12.24.38](/uploads/1549e54d4bc2a9939ef296ce66139706/Zrzut_ekranu_2016-08-05_o_12.24.38.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) cc @ubudzisz @yorickpeterse @grzesiek @tmaczukin See merge request !5496
Diffstat (limited to 'app/services/merge_requests')
-rw-r--r--app/services/merge_requests/update_service.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/services/merge_requests/update_service.rb b/app/services/merge_requests/update_service.rb
index 30c5f24988c..398ec47f0ea 100644
--- a/app/services/merge_requests/update_service.rb
+++ b/app/services/merge_requests/update_service.rb
@@ -11,6 +11,10 @@ module MergeRequests
params.except!(:target_project_id)
params.except!(:source_branch)
+ if merge_request.closed_without_fork?
+ params.except!(:target_branch, :force_remove_source_branch)
+ end
+
merge_request.merge_params['force_remove_source_branch'] = params.delete(:force_remove_source_branch)
update(merge_request)