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/serializers | |
parent | 505485f4859b9b9bc05be6d58f0a17823d6d3374 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/merge_request_poll_widget_entity.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/app/serializers/merge_request_poll_widget_entity.rb b/app/serializers/merge_request_poll_widget_entity.rb index 12998d70a22..fc1534a88aa 100644 --- a/app/serializers/merge_request_poll_widget_entity.rb +++ b/app/serializers/merge_request_poll_widget_entity.rb @@ -33,13 +33,17 @@ class MergeRequestPollWidgetEntity < Grape::Entity # Booleans expose :mergeable_discussions_state?, as: :mergeable_discussions_state do |merge_request| - # 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, merge_request.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 |