Skip to content

Expose approvals required and approvals left

What does this MR do?

This change exposes merge request approvals required and approvals left in the project merge requests GraphQL API.

Note: there is a N+1 query problem when loading these fields (including the previously exposed approved field). I plan to fix this in 13.5: #243709 (closed)

Example query:

{
  project(fullPath:"root/metrics") {
    mergeRequests {
      nodes {
        approvalsLeft
        approvalsRequired
      }
    }
  }
}

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Adam Hegyi

Merge request reports

Loading