GitHub Telegram Notifier is a NestJS application designed to forward GitHub webhook events to a Telegram chat. It enables real-time notifications for activities such as commits, pull requests, and issues directly in a Telegram chat, facilitating faster and more convenient updates for developers and teams.
- Real-time Notifications: Receive updates in Telegram for push events, pull requests, issues, and more.
- Customizable Event Subscriptions: Choose which events in your GitHub repository trigger notifications.
- Secure Communication: Validates GitHub webhook payloads to ensure authenticity.
- Easy to Set Up and Use: Designed with simplicity in mind for quick integration and configuration.
- Language: TypeScript
- Framework: NestJS
- Runtime Environment: Node.js
- Other Technologies:
- GitHub Webhooks for event triggers.
- Telegram Bot API for sending notifications.
Follow these instructions to get the project up and running on your local machine for development and testing purposes.
- Node.js (v12.x or higher)
- npm (v6.x or higher) or Yarn
- A GitHub account
- A Telegram account with a bot created via BotFather
Clone the repository
Open your terminal, navigate to your desired directory, and run the following command to clone the repository:
git clone https://github.com/koayenay/GitHub-Telegram-Notifier.git
cd GitHub-Telegram-Notifier
To get started with this project, follow these steps:
npm install
# Or using Yarn
yarn install
Create a .env file in the root directory and add the following configurations:
TELEGRAM_BOT_TOKEN=<your_telegram_bot_token>
TELEGRAM_CHAT_ID=<your_telegram_chat_id>
GITHUB_WEBHOOK_SECRET=<your_github_webhook_secret>
npm run start
yarn start
To receive notifications from GitHub, you need to set up a webhook:
- Go to your GitHub repository's settings.
- Navigate to "Webhooks" > "Add webhook".
- For the "Payload URL", use your server URL (or ngrok URL during development) followed by
/webhooks/github
, e.g.,http://123abc.ngrok.io/webhooks/github
. - Select
application/json
for the "Content type". - Input the
GITHUB_WEBHOOK_SECRET
you defined in your.env
file. - Choose the events you want to receive notifications for.
- Make sure the webhook is active and click "Add webhook".
Arfan Myint - LinkedIn Project Link: https://github.com//GitHub-Telegram-Notifier