
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>
32 lines
573 B
GraphQL
32 lines
573 B
GraphQL
query getPipelineDetails($projectPath: ID!, $iid: ID!) {
|
|
project(fullPath: $projectPath) {
|
|
id
|
|
pipeline(iid: $iid) {
|
|
id
|
|
iid
|
|
complete
|
|
stages {
|
|
nodes {
|
|
name,
|
|
groups {
|
|
nodes {
|
|
jobs {
|
|
nodes {
|
|
id
|
|
name
|
|
needs {
|
|
nodes {
|
|
id
|
|
name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|