https://github.com/phpfour/github-discord-relay
A simple webhook relay server for GitHub → Discord
https://github.com/phpfour/github-discord-relay
Last synced: 11 months ago
JSON representation
A simple webhook relay server for GitHub → Discord
- Host: GitHub
- URL: https://github.com/phpfour/github-discord-relay
- Owner: phpfour
- Created: 2024-06-16T23:49:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-01T09:54:50.000Z (over 1 year ago)
- Last Synced: 2025-03-08T17:48:56.594Z (11 months ago)
- Language: PHP
- Size: 122 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub to Discord Webhook Relay
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.
## Installation
### Prerequisites
- PHP >= 8.1
- Composer
- Laravel 10.x or later
### Steps
1. **Clone the Repository**
```bash
git clone https://github.com/phpfour/github-discord-relay.git
cd github-discord-relay
```
2. **Install Dependencies**
```bash
composer install
```
3. **Configure Environment**
Copy the .env.example file to .env and update the `DISCORD_WEBHOOK_URL` variable with your Discord webhook URL:
```bash
cp .env.example .env
```
4. Generate Application Key
```
php artisan key:generate
```
5. Update the GitHub User to Discord User mapping in the `config/github-discord.php` file.
```php
'github_to_discord_map' => [
// GitHub username => Discord user ID
'phpfour' => '<@538057585698537506>',
],
```
6. Host the application on a server and point your GitHub webhook to the `/github/webhook` endpoint.