A simple GitHub webhook listener written in Go. It listens for incoming webhook requests from GitHub and handles various types of GitHub events (e.g. push, pull request, issue) and sends them to a Telegram chat.
The GitHub Webhook Listener project is a simple application written in Go that listens for incoming webhook requests from GitHub. It handles various types of GitHub events such as push, pull request, issue, and more. The application is designed to be a basic example of how to create a GitHub webhook listener using Go.
- Listens for incoming webhook requests from GitHub
- Handles various types of GitHub events (e.g. push, pull request, issue)
- Serves a simple HTML page at the root URL
- Go version 1.23.3 or higher
- BotToken - Get it from Telegram
- GitHub webhook setup (see below for details)
- Vercel if you want to deploy it to production
- Ngrok if you want to deploy it to localhost
- Clone this repository to your local machine
- Install Go (if not already installed)
- Run
go run main.go
to start the application - Configure your GitHub webhook to point to
http://localhost:3000/github-webhook
use Ngrok for testing
- Clone this repository to your local machine
- Install Go (if not already installed)
- Run
go run main.go
to start the application - Configure your GitHub webhook to point to
http://localhost:3000/github-webhook
As you know You can't use localhost for webhooks. you can use Ngrok for that.
- Go to your GitHub repository settings
- Click on "Webhooks"
- Click on "Add webhook"
- Enter the URL
http://localhost:3000/github-webhook
- Choose the events you want to listen for (e.g. push, pull request, issue)
- Click "Add webhook"
- Fork this repository to your GitHub account
- Visit Vercel.com and Create a new Vercel project
- Deploy the forked repository to Vercel
- Done !
/github
: Handles incoming webhook requests from GitHub (e.g./github?chat_id=123456789
)/
: Serves a simple HTML page
Pull requests are welcome! If you'd like to contribute to this project, please fork the repository and submit a pull request.
This project is licensed under the MIT License.