Auto-generate review summary when submitted
What does this MR do and why?
When a review is submitted, we ask AI provider to generate a summary of the review. We then store it in the DB.
This follows the guidance we have in https://docs.gitlab.com/ee/development/ai_features.html#how-to-implement-a-new-action minus adding the service in Llm::ExecuteMethodService
as we don't want this to be exposed via AiAction
GraphQL mutation.
This is behind automatically_summarize_mr_review
feature flag.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Enable
automatically_summarize_mr_review
. - Follow https://docs.gitlab.com/ee/development/ai_features.html#test-ai-features-locally.
- Open a MR.
- Make some comments that are added to a review then submit review.
- Using rails console, confirm that the
MergeRequest::ReviewLlmSummary
records are created:MergeRequest::ReviewLlmSummary.find_by(review: Review.last)
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 #415358 (closed)
Edited by Patrick Bajao