Introduce mutation for group level

What does this MR do and why?

This MR introduces a GraphQL mutation to enable/disable web-based commit signing at the group level, completing the backend-frontend integration for the group-level UI setting.

Key changes:

  • Implements updateGroupWebBasedCommitSigning GraphQL mutation for persisting group-level settings
  • Connects the frontend checkbox component to the mutation with proper error handling and state management
  • Adds SaaS feature availability checks to ensure the setting only appears on GitLab.com
  • Updates documentation to reflect the new group-level configuration option
  • Adds comprehensive test coverage for both group and project-level settings pages
  • Introduces small UX improvements: disabling the checkbox when fetching data and showing a toast confirming the setting changed

This enables group owners to configure web-based commit signing once at the group level, with automatic inheritance to all projects within the group.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

Quick Setup

  1. Generate signing key:
ssh-keygen -t ed25519 -f ~/gdk-signing-key -N ""
  1. Add to gdk.yml:
  gitaly:
     git:
       committer_name: GitLab
       committer_email: noreply@gdk.test
       signing_key: /Users/YOUR_USERNAME/gdk-signing-key
  1. Enable SaaS simulation:
cat > env.runit << 'EOF'
export GITLAB_SIMULATE_SAAS=1
EOF
  1. Enable feature flags:
Feature.enable(:configure_web_based_commit_signing)
Feature.enable(:use_web_based_commit_signing_enabled)
Feature.enable(:web_based_commit_signing_ui)
  1. Apply changes:
gdk reconfigure
gdk restart

Test the Feature

Group-level settings:

  1. Navigate to a group's Settings → Repository
  2. Enable "Sign web-based commits" checkbox
  3. Verify the setting persists after page refresh
  4. Check that the mutation successfully updates the database

Project-level inheritance:

  1. Navigate to a project within the group's Settings → Repository
  2. Verify the checkbox is checked and disabled (inherited from group)
  3. Disable the setting at group level
  4. Verify the project checkbox becomes unchecked and remains disabled

Troubleshooting

If the setting doesn't persist, verify SaaS simulation:

cd gitlab && source ../env.runit && bundle exec rails runner "puts Gitlab.com?"

Should return true.

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.

Related to #580999 (closed)

Edited by Paulina Sedlak-Jakubowska

Merge request reports

Loading