Skip to content

Implement basic version of automated code review

Patrick Bajao requested to merge 454938-ai-review-merge-request into master

What does this MR do and why?

This introduces a ai_review quick action which will execute a LLM completion called ReviewMergeRequest.

This will make a request to AI for each diff hunk and create a note for each diff hunk reviewed.

Diff files that are not diffable and deleted will be excluded from the review.

This is behind the ai_review_merge_request feature flag so no changelog.

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.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Follow steps in this doc.
  2. Enable ai_review_merge_request.
  3. Create a MR on AI enabled project.
  4. Comment /ai_review to execute quick action.
  5. Wait for the comments to show up.

Related to #454938 (closed)

Edited by Patrick Bajao

Merge request reports