summaryrefslogtreecommitdiff
path: root/app/presenters
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2019-05-22 18:45:27 +0700
committerShinya Maeda <shinya@gitlab.com>2019-06-03 13:15:29 +0700
commitd4b46936633a3b2a0248b4572b4a1dc7b2ba8531 (patch)
treebf5c1cf5a8ebf1568ca62576d63ff793ce29764f /app/presenters
parent96744d0befd7e298c08e6d20a4f504086a717c35 (diff)
downloadgitlab-ce-d4b46936633a3b2a0248b4572b4a1dc7b2ba8531.tar.gz
Abstract auto merge processes
We have one auto merge strategy today - Merge When Pipeline Succeeds. In order to add more strategies for Merge Train feature, we abstract the architecture to be more extensible. Removed arguments Fix spec
Diffstat (limited to 'app/presenters')
-rw-r--r--app/presenters/merge_request_presenter.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/presenters/merge_request_presenter.rb b/app/presenters/merge_request_presenter.rb
index ba0711ca867..9c44ed711a6 100644
--- a/app/presenters/merge_request_presenter.rb
+++ b/app/presenters/merge_request_presenter.rb
@@ -22,9 +22,9 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated
end
end
- def cancel_merge_when_pipeline_succeeds_path
- if can_cancel_merge_when_pipeline_succeeds?(current_user)
- cancel_merge_when_pipeline_succeeds_project_merge_request_path(project, merge_request)
+ def cancel_auto_merge_path
+ if can_cancel_auto_merge?(current_user)
+ cancel_auto_merge_project_merge_request_path(project, merge_request)
end
end