Skip to content

Added filtering by reviewer state to merge request finder

Phil Hughes requested to merge ph/reviewerStateFilter into master

What does this MR do and why?

This is part of the new merge request dashboard we will be working on. We need to be able to search for merge requests that have certain reviewer states.

This includes 2 different ways to query - with a reviewer and without. With the reviewer will search for merge requests that have the assigned reviewer with the passed in state. Without the reviewer will search for merge requests that have any reviewer with the passed in state. This is useful for when we will search for merge requests a user is an assignee on and has reviews with certain states.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

How to set up and validate locally

query {
  currentUser {
    reviewRequestedMergeRequests(state: opened, reviewerState: REQUESTED_CHANGES) {
      nodes {
        id
      }
    }
  }
}

It should return any merge request that you are a reviewer of and have requested changes on.

Merge request reports