Module Description
This module provides a framework for providing patch files for config (the differences between active configuration and sync configuration). For a site that's built out from source files, this allows sitebuilders to make changes to configuration in the UI and push a button to create a patch which may then be committed back to source. The framework is extensible, so additional output plugins may provide integrations with e.g., cloud source control providers.
Since patches reference config yml file paths, the base path of these files is configurable. If your synchronized config is stored in `drupal/config` in your source repo, you might configure `drupal/config` as your base config path in config_patch. If on the other hand, your various repositories and environments all follow the same Drupal path structure, insert something like the following into settings.php for zero module configuration:
$config['config_patch.settings']['config_base_path'] = 'web/' . $settings['config_sync_directory']; (below where config_sync directory has been defined).
When installed, config_patch provides an additional tab `Patch` on the admin config synchronization pages listing config that's out of sync and providing a button to output the patch in various forms. The action of the button is controlled by the currently selected output plugin.
# Available output plugins:
- Text: provides text output of a unified diff patch - [Gitlab](https://drupal.org/project/config_patch_gitlab): provides submission to Gitlab repositories using MR-by-email functionality. - [Gitlab API](https://www.drupal.org/project/config_patch_gitlab_api): create an MR in Gitlab directly using their API - [Gitea](https://www.drupal.org/project/config_patch_gitea): create an PR on Gitea - [Azure API](https://www.drupal.org/project/config_patch_azure_api): push config to any Azure instance by using the Azure DevOps API.
# Similar modules:
- [Config Partial Export](https://www.drupal.org/project/config_partial_export): export a tarball of config ymls that differ between sync and active - [Config PR](https://www.drupal.org/project/config_pr): very similar to this module; make a PR in Github, Gitlab, or Bitbucket based on a config patchset
# Drush integration:
* drush config:patch PLUGIN_ID (create a patch via a plugin)
* drush config:patch:list (list files that have changed)
If you have a drush alias (or similar way to run drush on a remote site), you can easily apply config changes from that site to your local repo:
drush cpatch text|patch -p1
Since patches reference config yml file paths, the base path of these files is configurable. If your synchronized config is stored in `drupal/config` in your source repo, you might configure `drupal/config` as your base config path in config_patch. If on the other hand, your various repositories and environments all follow the same Drupal path structure, insert something like the following into settings.php for zero module configuration:
$config['config_patch.settings']['config_base_path'] = 'web/' . $settings['config_sync_directory']; (below where config_sync directory has been defined).
When installed, config_patch provides an additional tab `Patch` on the admin config synchronization pages listing config that's out of sync and providing a button to output the patch in various forms. The action of the button is controlled by the currently selected output plugin.
# Available output plugins:
- Text: provides text output of a unified diff patch - [Gitlab](https://drupal.org/project/config_patch_gitlab): provides submission to Gitlab repositories using MR-by-email functionality. - [Gitlab API](https://www.drupal.org/project/config_patch_gitlab_api): create an MR in Gitlab directly using their API - [Gitea](https://www.drupal.org/project/config_patch_gitea): create an PR on Gitea - [Azure API](https://www.drupal.org/project/config_patch_azure_api): push config to any Azure instance by using the Azure DevOps API.
# Similar modules:
- [Config Partial Export](https://www.drupal.org/project/config_partial_export): export a tarball of config ymls that differ between sync and active - [Config PR](https://www.drupal.org/project/config_pr): very similar to this module; make a PR in Github, Gitlab, or Bitbucket based on a config patchset
# Drush integration:
* drush config:patch PLUGIN_ID (create a patch via a plugin)
* drush config:patch:list (list files that have changed)
If you have a drush alias (or similar way to run drush on a remote site), you can easily apply config changes from that site to your local repo:
drush cpatch text|patch -p1
Module Link
Project Usage
382
Security Covered
Not Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to solve the issue of providing patch files for config, allowing sitebuilders to make changes in the UI and create patches to be committed back to source, with extensible output plugins for integration with cloud source control providers.
Data Name
config_patch