Skip to content

coders-for-coders/github-discord-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-discord-middleware

A production-ready Node.js Express application that acts as a secure GitHub webhook to Discord message transformer.

Features

  • Handles GitHub webhook events securely using SHA-256 HMAC verification.
  • Transforms GitHub webhook payloads to nicely styled Discord rich embeds.
  • Supported Events: push, fork, watch (stars).

Setup & Installation

  1. Clone the repository.

  2. Install dependencies: npm install

  3. Configure Environment Variables: Rename .env.example to .env and fill in the details:

    PORT=3000
    DISCORD_WEBHOOK_URL=your-discord-webhook-url
    GITHUB_WEBHOOK_SECRET=your-random-secret
    NODE_ENV=development
  4. Start the server: npm start For development with live reload: npm run dev

Endpoints

  • POST /github Receives payloads from GitHub.

  • GET /health Checks application health.

Security Notes

This server natively implements GitHub's x-hub-signature-256 webhook verification. A valid secret is securely hashing the RAW request body payloads.

About

Our internal tool for sending github updates to discord server using webhooks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors