Commit 4ab0b33d authored by Shinya Maeda's avatar Shinya Maeda

Clarify comments about for_merge_request

parent c6b7954b
......@@ -180,8 +180,9 @@ module Ci
scope :for_merge_request, -> (merge_request, ref, sha) do
##
# We have to filter out unrelated MR pipelines, in case,
# there are two merge requests from the same source branch
# We have to filter out unrelated MR pipelines.
# When merge request is empty, it selects general pipelines, such as push sourced pipelines.
# When merge request is matched, it selects MR pipelines.
where(merge_request: [nil, merge_request], ref: ref, sha: sha)
.sort_by_merge_request_pipelines
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