Implement mergeRequestDiffs property for MergeRequestType
What does this MR do and why?
This adds mergeRequestDiffs
property to MergeRequestType
in
GraphQL API.
It returns the following properties:
-
diff_llm_summary
- returns aMergeRequestDiffLlmSummaryType
-
review_llm_summaries
- returns a collection ofMergeRequestReviewLlmSummaryType
. Supports cursor pagination. created_at
updated_at
How to set up and validate locally
-
Run migration:
rake db:migrate
. -
Create a MR.
-
Submit a review on the MR.
-
Create
MergeRequest::ReviewLlmSummary
record for the submitted review via rails console:MergeRequest::ReviewLlmSummary.create(merge_request_diff: MergeRequestDiff.last, review: Review.last, user: User.llm_bot, provider: :open_ai, content: "Review summary")
-
Make this GraphQL query:
query { project(fullPath: "<insert path of project>") { id mergeRequest(iid: "<insert IID of MR>") { id mergeRequestDiffs { edges { cursor node { diffLlmSummary { user { id } provider content createdAt updatedAt } reviewLlmSummaries { edges { cursor node { user { id } reviewer { id } provider content createdAt updatedAt } } } } } } } } }
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #415359 (closed)
Edited by Patrick Bajao