Prototype a pipeline step for automated AI review of MRs

Migrated issue

Reported by: hestenet

Problem/Motivation

A recent post by @dries had some interesting thoughts:
https://dri.es/can-ai-clean-up-its-own-mess

AI risks adding to that burden. It makes it easier for people to generate code and submit pull requests, but reviewing those code contributions still falls on the same few maintainers. When contributions scale up, review capacity has to keep pace.

And just like with energy discovery, AI might also be the solution. There already exist AI-powered review tools that can scan pull requests, enforce project standards and surface issues before a human even looks at them. If you believe AI-generated code is here to stay (I do), AI-assisted review might not be optional.

There are a couple barriers to getting this done for Drupal:

  1. Would be nice to find a community member who wants to create a test pipeline to do that that we could nominate to include in the template
  2. We'd need to figure out how to pay for the AI credits.

Proposed resolution

It would be great to see a contributor try to develop a GitLab CI pipeline step/example config file that would use an AI provider to manage things like phpcs/phpstan clean ups, maybe even more general review, and perhaps even suggest changes to the MR.

This would be need to set up in a way that allows the maintainer to specify their own AI provider for now - until or unless the DA can secure an AI tooling sponsor for CI testing.

Remaining tasks