Create a new pipelines finder for Merge Requests
At the moment we use several methods to retrieve the pipelines related to a merge request:
Ci::Pipeline#all_merge_requests
MergeRequests#all_pipelines
MergeRequests::CreateService#head_pipelines_for
But since https://gitlab.com/gitlab-org/gitlab-ee/issues/5426 we've seen that we may need to filter the pipelines that we retrieve.
For this purpose, it's better to use a finder rather than tweaking the existing methods.
Edited by Francisco Javier López (ex-Gitlab)