Improved the Drupal GitHub Webhook Module
I improved the custom module “GitHub Webhook” that triggers GitHub Actions from Drupal’s admin interface.
https://github.com/nakamura196/Drupal-module-github_webhook
It was originally a basic module with multi-repository support, but I added features such as UI tab separation, granular permissions, workflow status display, and auto-triggering.
The Module Before Improvements The original module had the following structure:
File count: 5 files (info.yml, routing.yml, links.menu.yml, permissions.yml, SettingsForm.php) Supported version: Drupal 10 only Repositories: Multi-repository support (dynamic add/remove via AJAX) Interface: Settings and trigger on the same screen (2 accordions) Permissions: Single access github webhook settings permission (same for both settings and triggering) Token management: #default_value set on password field (token output in plaintext in HTML source) HTTP client: Direct instantiation of new \GuzzleHttp\Client() Exception classes: Written in catch blocks without use statements (incorrect namespace resolution) // Before: Token was set in #default_value $form['settings']['github_token'] = [ '#type' => 'password', '#title' => $this->t('GitHub Token'), '#default_value' => $config->get('github_token'), // Output in plaintext in HTML ]; // Before: Guzzle client was directly instantiated with new $client = new \GuzzleHttp\Client(); Overview of Changes Comparison of file structures before and after the improvements. * indicates modified files, + indicates newly added files.
...
February 11, 2026 · Updated: February 11, 2026 · 10 min · Nakamura