GitHub WebHook Endpoint

Component ID

1946266

Component name

GitHub WebHook Endpoint

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

1496

Component created

Component changed

Component body

Overview

This module allows GitHub to communicate with the Drupal application whenever a repository is pushed to. It does this by providing a configurable webhook URL that GitHub service hooks can issue POST requests to. The GitHub WebHook Endpoint module doesn't provide any reactions to the events, however it invokes hooks that developers and other modules can implement in order to take the appropriate action.

Installation

Follow the standard module installation guide to install the GitHub WebHook Endpoint module.

Usage

After installation, visit admin/config/services/github-webhook as a user with the Administer site configuration permission. This page will allow you to configure the path to the webhook endpoint and an optional security token. After configuring the endpoint, add it as a WebHook URL in the repository's settings on GitHub. Refer to the Post-Receive Hooks documentation on GitHub for more details.

To react to a push event, implement hook_github_webhook_event().

To provide fine-grained access control, implement hook_github_webhook_access().

For the structure of the $payload variable that is passed to the hooks, refer to the Post-Receive Hooks documentation on GitHub.