Skip to content

Add role_approvers to graphql response

Sashi Kumar Kumaresan requested to merge sk/379058-role-approvers into master

What does this MR do and why?

Addresses #379058 (closed)

This MR updates ScanResultPolicies graphql query to return role_approvers that are configured from the security policy.

Graphql Query sample

query {
  project(fullPath:"root-group/target") {
    fullPath
    scanResultPolicies {
      nodes {
        groupApprovers {
          id
        }
        roleApprovers
      }
    }
  }
}
Response
{
  "data": {
    "project": {
      "fullPath": "root-group/target",
      "scanResultPolicies": {
        "nodes": [
          {
            "groupApprovers": [
              {
                "id": "gid://gitlab/Group/76"
              }
            ],
            "roleApprovers": [
              "MAINTAINER"
            ]
          }
        ]
      }
    }
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports