content_patch_gitlab_api
The Content Patch GitLab API module provides a streamlined workflow for exporting specific content entities (Nodes, Media, Terms) directly from a Drupal site to a GitLab repository as a Merge Request.
While Drupal 11’s Site Templates (part of Drupal CMS 2.0) allow for a full site export (drush site:export), they often follow an "all or nothing" approach. This module fills the gap by allowing editors and administrators to select and export granular "Demo Content" to be used in future installations or site template distributions.
This module allows editors to create high-quality demo content on a staging environment and contribute it back to the technical site template repository without needing Git CLI knowledge.
Features
- Granular Export: Export individual nodes or entities directly from the content overview (/admin/content) via Bulk Operations
- Dependency Tracking: Automatically detects and includes referenced entities such as Media, Taxonomy Terms, and Canvas Pages (Drupal CMS)
- GitLab Integration: Creates a Merge Request (MR) directly in a configured GitLab repository (similar to Config Patch GitLab API)
- Flexible Delivery: Choose between a direct GitLab MR
- Site Template Ready: Exported content is structured to be easily integrated into Drupal’s "Site Template" workflow for fresh installations
- Developer Friendly: Built to work with Drupal CMS 2.0 and standard Drupal 11 core functions
Post-Installation
How does this module actually work once I install it? Should I go to a config page? Should I look for a new content type? Should I go and manage my text formats? Provide an overview of the configuration process and any other special considerations for the module.
Additional Requirements
Does this project need anything beyond Drupal core? Include any dependent modules, libraries, APIs, etc., that are required for this project to work.
Configuration
Administrators can configure:
- The target GitLab Repository and API Token
- The specific export path within the repository
- Permissions for which roles can trigger the export operations
Relationship to other modules
- Config Patch GitLab API: This module serves as the content-centric counterpart, focusing on entity data rather than configuration
- Drupal Core (Site Templates): Enhances the core export functionality by adding granularity and a UI-based contribution workflow for non-technical users