Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 2.51 KB

README.md

File metadata and controls

42 lines (34 loc) · 2.51 KB

Github Webhooks Relay

Relay sent webhooks for repository push events to your Discord server.

Features

  • customizable Discord message - from a detailed embed to simple commit summary
  • ability to hide a commit message / repository name
  • supports Discord Role mention
  • supports GitHub Secret Token protection
  • supports multiple Discord webhooks at once

Installation

Without Composer

  1. Download webhook-relay.zip file from latest release
  2. Unzip it and upload folder content to your webhost

With Composer

  1. Download relay.php and config.php files and upload them to your webhost
  2. Install Livaco Discord Webhook library using composer install command

  1. Edit config.php to your likings

For $dc_webhookurl: Edit channel > Integrations > Webhooks > Create or select one > Copy Webhook URL
For $dc_secret: You can set a secret, which will be used to verify the webhook's authenticity. (It needs to be the same as in your repository settings and should be secure.)

  1. In your repository settings, add a Webhook with the following details

Payload URL: URL to your relay.php file (https://example.com/relay.php)
Content Type: application/x-www-form-urlencoded
Secret: Here you can enter a secret, which will be used to verify the webhook's authenticity. (It needs to be the same as in your config.php and should be secure.)

  1. Upon webhook creation, you should now receive a message upon every push to the repository

image

Customization

Too simple? Fear not, Livaco got your back!
You can customize your embed in relay.php file at line 81.

List of available methods to customize your embed
A complicated example by Livaco
image

Credits