Remove tap and use simplified method call

This commit is contained in:
Oswaldo Ferreira 2018-01-29 16:29:25 -02:00
parent 2944896466
commit 395e500f01

View file

@ -513,7 +513,8 @@ module API
# See https://gitlab.com/gitlab-org/gitlab-ce/issues/42344 for more
# information.
expose :merge_status do |merge_request|
merge_request.tap(&:check_if_can_be_merged).merge_status
merge_request.check_if_can_be_merged
merge_request.merge_status
end
expose :diff_head_sha, as: :sha
expose :merge_commit_sha