Feature Request: Support Include Directive in mr-review-instructions.yaml
Problem Statement
To share and leverage experience with GitLab Duo custom configuration, teams need a way to maintain review instructions in a central repository and reference them from multiple projects. In particular, it should be possible to share different review instructions for different file-types, and for projects to decide which instructions they want to include/inherit/reuse, and which they want to define project-specifically.
Proposed Solution
Add support for an include directive in mr-review-instructions.yaml, similar to the existing functionality in .gitlab-ci.yml.
Use Case
Organizations could collect and optimize review instructions for specific file types customized to their standards and applications.
These could be maintained in a centralized project (e.g., ai-adoption/gitlab-duo) with versioned instruction files such as review-instructions/python-review.yaml.
Other projects could leverage these instructions and automatically benefit from refinements:
In project group/product, file .gitlab/duo/mr-review-instructions.yaml
include:
- project: "ai-adoption/gitlab-duo"
file: "review-instructions/python-review.yaml"
ref: 1.0.1
# Project-specific overrides can follow
...
Ideally it is possible to include snippets for certain file types, to have a pick-and-mix approach, e.g.
instructions:
- include:
- project: "ai-adoption/gitlab-duo"
file: "review-instructions/python-review.yaml"
ref: 1.0.1
- project: "ai-adoption/gitlab-duo"
file: "review-instructions/dockerfile-review.yaml"
ref: main
- name: Documentation Files
fileFilters:
- "**/*.md"
instructions:
...
# Project-specific overrides can follow
...
where python-review.yaml might look like this:
- name: Python Files
fileFilters:
- "**/*.py"
instructions:
...