Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ashokshau/github-webhook
GitHub webhook handler bot for Telegram, formatting push, deployment, and all events.
https://github.com/ashokshau/github-webhook
git-alert gitgram github github-api github-logging github-telegram go railway-app telegram vercel vercel-deployment webhook
Last synced: about 1 month ago
JSON representation
GitHub webhook handler bot for Telegram, formatting push, deployment, and all events.
- Host: GitHub
- URL: https://github.com/ashokshau/github-webhook
- Owner: AshokShau
- License: mit
- Created: 2024-11-23T18:47:10.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2024-11-23T19:33:08.000Z (about 1 month ago)
- Last Synced: 2024-11-23T20:27:13.929Z (about 1 month ago)
- Topics: git-alert, gitgram, github, github-api, github-logging, github-telegram, go, railway-app, telegram, vercel, vercel-deployment, webhook
- Language: Go
- Homepage: https://git-hook.vercel.app/
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Webhook Listener
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.## Overview
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.## Features
* 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## Requirements
* Go version 1.23.3 or higher
* BotToken - Get it from [Telegram](https://t.me/BotFather)
* 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## Installation
1. Clone this repository to your local machine
2. Install Go (if not already installed)
3. Run `go run main.go` to start the application
4. Configure your GitHub webhook to point to `http://localhost:3000/github-webhook` use Ngrok for testing## Setup
1. Clone this repository to your local machine
2. Install Go (if not already installed)
3. Run `go run main.go` to start the application
4. 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](https://dashboard.ngrok.com/get-started/setup/linux) for that.## GitHub Webhook Setup
1. Go to your GitHub repository settings
2. Click on "Webhooks"
3. Click on "Add webhook"
4. Enter the URL `http://localhost:3000/github-webhook`
5. Choose the events you want to listen for (e.g. push, pull request, issue)
6. Click "Add webhook"## Deployment
### Vercel Deployment
1. Fork this repository to your GitHub account
2. Visit Vercel.com and Create a new Vercel project
3. Deploy the forked repository to Vercel
4. Done !## API Documentation
* `/github`: Handles incoming webhook requests from GitHub (e.g. `/github?chat_id=123456789`)
* `/`: Serves a simple HTML page## Contributing
Pull requests are welcome! If you'd like to contribute to this project, please fork the repository and submit a pull
request.## License
This project is licensed under the [MIT License](LICENSE).