Commit 8002c505 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'use-cheap-operation-for-ci-pipeline-all_merge_requests' into 'master'

Use cheap operation for `Ci::Pipeline#all_merge_requests`

Closes #54907

See merge request gitlab-org/gitlab-ce!24115
parents 297d1fa0 11d622d5
...@@ -635,7 +635,7 @@ module Ci ...@@ -635,7 +635,7 @@ module Ci
def all_merge_requests def all_merge_requests
@all_merge_requests ||= @all_merge_requests ||=
if merge_request? if merge_request?
project.merge_requests.where(id: merge_request.id) project.merge_requests.where(id: merge_request_id)
else else
project.merge_requests.where(source_branch: ref) project.merge_requests.where(source_branch: ref)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment