Skip to content

Ban AI duo project settings

Lindsey Shelton requested to merge ban-ai-duo-project-settings into master

What does this MR do and why?

This MR covers the following Issues & their work statuses:

  • Complete | #460837 - [Ban AI] Add Project Setting
  • Complete (for Projects) | #463527 - [Ban AI] Documentation reflects new UI to turn off AI in certain places
  • Complete | #470584 - [Ban AI] Feature Flag Rollout admin and group vue settings

Please note, what work has not been completed in #460837 for the Lock Popover Button component will be handled in a new Issue here: #471111

The purpose of this MR is to update the ability of turning Duo features on/off from Projects (banning only occurs in Group Settings | See MR. A new Toggle has been created under Project > Settings > Visibility, project features, permissions (at the bottom of the section). The reason for this is for more intuitive user experience when configuring Duo Settings, making it easier to find and less confusing overall.

Under Turn off for a project, the instructions are modified as:

(Remove Steps 1 & 2)

  • [Add] 1. On the left sidebar, select Search or go to and find your project.
  • [Add] 2. Select Settings > General.
  • [Add] 3. Expand Visibility, project features, permissions.
  • [Add] 4. Under GitLab Duo turn the toggle on.
  • [Add] 6. Select Save changes.

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.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before: Screenshot_2024-06-24_at_1.07.53_PM

After: Screenshot_2024-06-24_at_1.07.14_PM

How to set up and validate locally

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

Test #460837 - Duo Project Settings

Pre-Step 1. In rails console enable the experiment fully

Feature.enable(:ai_settings_vue_project)

Pre-Step 2. Log into your GDK/Local Instance (Make sure you are in SAAS mode and on the Ultimate tier)

    1. It is assumed that the 'GitLab Duo preview features' checkbox is selected
  1. Test 'On'
    1. Go to the top level Project Settings (that has the Ultimate license set): Protect > Settings > General > Visibility, project features, permissions.
    1. Under 'GitLab Duo' toggle on.
    1. Select 'Save changes'
    1. Validate Duo Features are enabled (you can go to a Project Issue and see if Issue description generation is available as an example)
  1. Test 'Off'
    1. Go to the top level Project Settings (that has the Ultimate license set): Protect > Settings > General > Visibility, project features, permissions.
    1. Under 'GitLab Duo' toggle off.
    1. Select 'Save changes'
    1. Validate Duo Features are disabled (you can go to a Project Issue and see if Issue description generation is not available as an example)
  1. Test 'Banned'
    1. Go to the top level Group Settings (that has the Ultimate license set): Group > Settings > General > Permissions and group features.
    1. Make sure the 'GitLab Duo preview features' checkbox is unselected & make sure the cascading checkbox underneath 'Enforce for all subgroups' is checked/selected.
    1. Select 'Save changes'
    1. Go to the top level Project Settings (that has the Ultimate license set): Protect > Settings > General > Visibility, project features, permissions.
    1. Under 'GitLab Duo', validate the toggle is disabled and you cannot make any changes.

This code update introduces a new feature called "GitLab Duo" for projects. It uses AI-powered features and provides additional help text and links to relevant documentation for users to understand and utilize the feature. Additionally, it includes changes to the project permissions panel, making it more informative and user-friendly.

Edited by Lindsey Shelton

Merge request reports