Query group level web-based commit signing

What does this MR do and why?

This merge request implements GraphQL query integration for group-level web-based commit signing settings. The changes enable the UI to fetch the current state of web-based commit signing from the backend using GraphQL instead of passing it as initial data attributes.

Key changes across 19 files

  1. New GraphQL Query (ee/app/assets/javascripts/graphql_shared/queries/web_based_commit_signing.query.graphql)
    • Adds getWebBasedCommitSigning query that supports both group and project levels
    • Uses @include and @skip directives to conditionally query group or project data
    • Retrieves webBasedCommitSigningEnabled field from the appropriate entity
  2. Component Migration to EE - Multiple files moved from app/ to ee/:
    • checkbox.vue, settings.vue, init_settings.js, and related files
    • Storybook stories and test files relocated to EE directory
    • View templates moved to EE-specific paths
  3. Checkbox Component Refactoring (ee/app/assets/javascripts/vue_shared/components/web_based_commit_signing/checkbox.vue)
    • Replaced initialValue prop with Apollo query integration
    • Added apollo configuration to fetch data using getWebBasedCommitSigningQuery
    • Implements error handling with Sentry integration via captureException
    • For projects, currently reads inherited group setting (project-level setting commented out pending backend support)
    • Checkbox is temporarily read-only for project level (isDisabled returns true when !isGroupLevel)
  4. Props Cleanup - Removed props no longer needed:
    • initialValue - replaced by Apollo query
    • groupWebBasedCommitSigningEnabled - now fetched via GraphQL
    • Simplified data passing from templates (removed web_based_commit_signing_enabled data attributes)
  5. Page Initialization Updates:
    • Group settings: Created new EE-specific entry point (ee/app/assets/javascripts/pages/groups/settings/index.js)
    • Repository settings: Updated to import from EE paths and initialize the component
    • Project settings: Updated imports to use EE versions
  6. Test Updates (ee/spec/frontend/vue_shared/components/web_based_commit_signing/checkbox_spec.js)
    • Rewritten to test Apollo integration
    • Added mock Apollo provider with query handlers
    • Tests for both group and project levels with different query responses
    • Tests for error handling and Sentry integration
    • Removed old tests for removed props
  7. Feature Spec (ee/spec/features/groups/settings/repository_spec.rb)
    • Added tests for General subsection visibility based on web_based_commit_signing_ui feature flag
    • Verifies checkbox rendering and checked state

Coming next...

These MRs are getting rather long for one submition.

  1. MR with the mutation
  2. MR allowing editing on the project level

References

Screenshots or screen recordings

Before After
Screenshot_2026-02-03_at_17.18.27 Screenshot_2026-02-03_at_17.10.46 Screenshot_2026-02-03_at_17.16.36
Screenshot_2026-02-03_at_17.18.20 Screenshot_2026-02-03_at_17.11.12

How to set up and validate locally

  1. In rails console enable the feature flag
    Feature.enable(:web_based_commit_signing_ui)
  2. Go to Group / Settings / Repository
  3. Make sure you can see General sub-section and that getWebBasedCommitSigning query was called and the value retrieved matches the state of the checkbox.

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