
We were using sha to fetch the pipeline from GraphQL, but that leads to wrong results when MR and branch pipelines exist. For example, using pipeline-url as the MR pipeline: - https://gitlab.freedesktop.org/gallo/mesa/-/pipelines/1017182 This would lead into the branch pipeline: - https://gitlab.freedesktop.org/gallo/mesa/-/pipelines/1013189 Also simplify the GQL query, it had lots of unused data. Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25858>