dev-master
9999999-dev https://github.com/roarbb/webhookerGithub Webhook Helper
MIT
The Requires
by Matej Sajgal
github webhook
Github Webhook Helper
The recommended way to install Webhooker is through Composer., (*1)
# Install Composer curl -sS https://getcomposer.org/installer | php
Next, run the Composer command to install the latest stable version of Webhooker:, (*2)
composer require roarbb/webhooker
Make sure that you have rights to update files on server, (*3)
chown -R www-data /path/to/website/root
In website root, create webhook.php file, (*4)
<?php use Webhook\Hook; include_once('vendor/autoload.php'); $hook = new Hook(); echo $hook->pull();
webhook.php, (*5)
<?php use Webhook\Hook; include_once('vendor/autoload.php'); $hook = new Hook(); $hook->setConfigFile(__DIR__ . '/config.neon'); if ($hook->isValidSignature()) { echo $hook->pull(); }
config.neon, (*6)
github: secret: secretToken123
webhook.php, (*7)
<?php use Webhook\Hook; include_once('vendor/autoload.php'); $hook = new Hook(); $hook->setGithubSecret('secretToken123'); if ($hook->isValidSignature()) { echo $hook->pull(); }
Login to github, and set up your webhook. Link: https://github.com/[username]/[repository]/settings/hooks, (*8)
, (*9)
Payload Url: Link to your webhook.php
Content Type: application/json
Secret: secretToken123
Which events would you like to trigger this webhook? - Just the push event.
Active: checked, (*10)
It may looks like this:
, (*11)
On producion server:
* Double-check permissions
* Don't forget to run composer update
, (*12)
You can check your automatic updates in Webhooks/Manage Webhook -> Recent Deliveries
, (*13)
Github Webhook Helper
MIT
github webhook