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

Clarify comments about for_merge_request

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