Allow selecting Duo project template from group settings

What does this MR do and why?

Allow selecting Duo project template from group settings when the Code Review flow is enabled.

This template project is used to store custom instructions for the Code Review flow (we may use it for other Duo features in the future).

The selection is only possible in top-level namespaces and is inherited by any project under that namespace or its subgroups.

References

Closes #595534 (closed)

Screenshots or screen recordings

Kapture_2026-04-23_at_13.18.53

How to set up and validate locally

  1. Choose a top-level namespace with Duo enabled
  2. Enable duo_code_review_group_level_instructions for that namespace: ::FeatureFlag.enable(:duo_code_review_group_level_instructions, namespace)
  3. Under that namespace, create a project to store custom instructions following the docs
  4. Go to the namespace Settings > General > GitLab Duo features section (e.g. http://gdk.test:3000/groups/gitlab-duo/-/edit#js-gitlab-duo-settings)
  5. Under Flows subsection, check Allow foundational flows and then Code Review
  6. A new option to select a template project to load Code Review custom instructions will appear

Screenshot_2026-04-23_at_13.11.12

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Wanderson Policarpo

Merge request reports

Loading
Loading