summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorKatarzyna Kobierska <kkobierska@gmail.com>2016-07-26 13:57:43 +0200
committerKatarzyna Kobierska <kkobierska@gmail.com>2016-08-30 13:05:40 +0200
commitc9c2503c5186a38302ed606f793b52ffa394f52c (patch)
treef03f46d41d71dcaf71bc867fa4ec949f8dc5931e /app/services
parent2778dec131c2afac9fcdb2c42365b69099a5ae5b (diff)
downloadgitlab-ce-c9c2503c5186a38302ed606f793b52ffa394f52c.tar.gz
User can edit closed MR with deleted fork
Add test for closed MR without fork Add view test visibility of Reopen and Close buttons Fix controller tests and validation method Fix missing space Remove unused variables from test closed_without_fork? method refactoring Add information about missing fork When closed MR without fork can't edit target branch Tests for closed MR edit view Fix indentation and rebase, refactoring
Diffstat (limited to 'app/services')
-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)