This simple application receives webhooks from GitHub, modifies the payload to replace GitHub user mentions with Discord user mentions, and relays the payload to a Discord channel via a webhook.
- PHP >= 8.1
- Composer
- Laravel 10.x or later
-
Clone the Repository
git clone https://github.com/phpfour/github-discord-relay.git cd github-discord-relay
-
Install Dependencies
composer install
-
Configure Environment
Copy the .env.example file to .env and update the
DISCORD_WEBHOOK_URL
variable with your Discord webhook URL:cp .env.example .env
-
Generate Application Key
php artisan key:generate
-
Update the GitHub User to Discord User mapping in the
config/github-discord.php
file.'github_to_discord_map' => [ // GitHub username => Discord user ID 'phpfour' => '<@538057585698537506>', ],
-
Host the application on a server and point your GitHub webhook to the
/github/webhook
endpoint.