diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-15 00:09:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-15 00:09:29 +0300 |
commit | 9a3208fad1dd1012e0e11b68a17020c5e03120db (patch) | |
tree | e3a4b50ac3a0ac3b0f42820dafe5e0a98d726afa /app/presenters/merge_request_presenter.rb | |
parent | 505485f4859b9b9bc05be6d58f0a17823d6d3374 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters/merge_request_presenter.rb')
-rw-r--r-- | app/presenters/merge_request_presenter.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/app/presenters/merge_request_presenter.rb b/app/presenters/merge_request_presenter.rb index 6dd3908b21d..efab1e84923 100644 --- a/app/presenters/merge_request_presenter.rb +++ b/app/presenters/merge_request_presenter.rb @@ -191,13 +191,17 @@ class MergeRequestPresenter < Gitlab::View::Presenter::Delegated end def mergeable_discussions_state - # This avoids calling MergeRequest#mergeable_discussions_state without - # considering the state of the MR first. If a MR isn't mergeable, we can - # safely short-circuit it. - if merge_request.mergeable_state?(skip_ci_check: true, skip_discussions_check: true) + if Feature.enabled?(:change_response_code_merge_status, project) merge_request.mergeable_discussions_state? else - false + # This avoids calling MergeRequest#mergeable_discussions_state without + # considering the state of the MR first. If a MR isn't mergeable, we can + # safely short-circuit it. + if merge_request.mergeable_state?(skip_ci_check: true, skip_discussions_check: true) + merge_request.mergeable_discussions_state? + else + false + end end end |