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
updateGroupWebBasedCommitSigningGraphQL 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
- Generate signing key:
ssh-keygen -t ed25519 -f ~/gdk-signing-key -N ""
- Add to gdk.yml:
gitaly:
git:
committer_name: GitLab
committer_email: noreply@gdk.test
signing_key: /Users/YOUR_USERNAME/gdk-signing-key
- Enable SaaS simulation:
cat > env.runit << 'EOF'
export GITLAB_SIMULATE_SAAS=1
EOF
- 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)
- Apply changes:
gdk reconfigure
gdk restart
Test the Feature
Group-level settings:
- Navigate to a group's Settings → Repository
- Enable "Sign web-based commits" checkbox
- Verify the setting persists after page refresh
- Check that the mutation successfully updates the database
Project-level inheritance:
- Navigate to a project within the group's Settings → Repository
- Verify the checkbox is checked and disabled (inherited from group)
- Disable the setting at group level
- 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