feat: introduce enabledWithoutGitlabProject Duo setting

Description

This MR introduces a new setting gitlab.duo.enabledWithoutGitLabProject.

This scenario is the motivation for this setting #1425 (closed)

TL;DR: if GitLab instance administrator sets duoFeaturesEnabled to false for a project, Duo features might still work for that project if the extension can't get the project details (e.g. the setting is on a self-managed instance, but the extension user uses gitlab.com account)

The setting is true by default.

  • true means that if we fail to fetch project details, we enable Duo Features
  • false means that we only enable duo features if we fetch the project details AND Duo Features are enabled for the project

Related Issues

Resolves #1425 (closed)

How has this been tested?

Without any setting ("gitlab.duo.enabledWithoutGitlabProject": true is the default)

  1. Open a GitLab project and see that suggestions still work
  2. Open a project that's not versioned on GitLab and see that the Duo features work

With "gitlab.duo.enabledWithoutGitlabProject": false

  1. Open a GitLab project and see that suggestions still work
  2. Open a project that's not versioned on GitLab and see that the Duo features don't work
  • you should see image in the status bar

The rest is covered with unit tests.

Screenshots (if appropriate)

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes
Edited by Tomas Vik (OOO back on 2026-01-05)

Merge request reports

Loading