Code Monkey home page Code Monkey logo

github-webhook-relay's Introduction

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

github-webhook-relay's People

Contributors

dotcore-off avatar justplayerde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

github-webhook-relay's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.