Skip to content

Add jobs field to Ci::PipelineType

Avielle Wolfe requested to merge 251015-add-jobs-to-pipeline-type into master

What does this MR do?

This is the first MR for implementing #251015 (closed). I'm completing the issue in multiple MRs to keep each one reviewable-y small 👀

  • Adds jobs field to Types::Ci::PipelineType
  • Adds jobs field to EE::Types::Ci::PipelineType
  • Adds Resolvers::Ci::JobsResolver with security_report_types argument
  • Adds Types::Security::SecurityReportTypeEnum

Screenshots (strongly suggested)

Query with securityReportTypes argument

{
  project(fullPath: "gitlab-org/gitlab") {
    pipelines {
      nodes {
        jobs(securityReportTypes: [SAST, DAST]) {
          nodes {
            name
          }
        }
      }
    }
  }
}

Produces a result with this structure

{
  "data": {
    "project": {
      "pipelines": {
        "nodes": [
          {
            "jobs": {
              "nodes": [
                {
                  "name": "dast"
                },
                {
                  "name": "sast"
                },
              ]
            }
          },
          {
            "jobs": {
              "nodes": [
                {
                  "name": "dast"
                },
                {
                  "name": "sast"
                },
              ]
            }
          },
        ]
      }
    }
  }
}       

Issue

#251015 (closed)

Merge request reports

Loading