Add support for filtering MRs by review in GraphQL
What does this MR do?
This adds support for filtering merge requests by their reviewer.
This feature is complete at the model, service/finder and UI level, but lacks support in the public GraphQL API.
GraphQL Queries
We can now filter by reviewer from Project.mergeRequests and any of the user
merge request fields:
query {
currentUser {
// assigned to me for review by me, any project
reviewerMergeRequests {
nodes { title reference }
}
// authored by me, reviewed by some-reviewer
authoredMergeRequests(reviewerUsername: "some-reviewer" {
nodes { title reference }
}
// assigned to me, reviewed by some-reviewer
assignedMergeRequests(reviewerUsername: "some-reviewer" {
nodes { title reference }
}
}
project(fullPath: "gitlab-org/gitlab") {
mergeRequests(reviewerUsername: "some-user-name") {
nodes { title reference }
}
}
}
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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 Alex Kalderimis