Real-time GitHub commit notifications delivered straight to your WhatsApp
Automated bot that monitors GitHub repositories and sends real-time WhatsApp notifications on new commits. Built with Node.js and Baileys, featuring auto-reconnect, rate limit handling, and detailed commit stats. Perfect for teams wanting instant repository updates.
- 🔔 Real-time notifications - Get instant alerts on new commits
- 📊 Detailed stats - View additions, deletions, and files changed
- 🔄 Auto-reconnect - Handles disconnections gracefully
- 🌐 Rate limit handling - Smart GitHub API rate limit management
- 📱 WhatsApp integration - Uses Baileys for stable connections
- 🎯 Modular architecture - Clean, maintainable code structure
- 🛡️ Error recovery - Automatic retry mechanism on failures
- Node.js 18 or higher
- WhatsApp account
- GitHub repository access
- GitHub Personal Access Token (optional, for higher rate limits)
- Clone the repository
git clone https://github.com/yourusername/whatsapp-github-notifier.git
cd whatsapp-github-notifier- Install dependencies
npm install- Configure the bot
Edit config.js with your settings:
export const CONFIG = {
OWNER: "YourGitHubUsername",
REPO: "YourRepoName",
BRANCH: "main",
TARGET_JID: "628xxxxxxxxxx@s.whatsapp.net",
POLL_INTERVAL: 60_000,
GITHUB_TOKEN: process.env.GITHUB_TOKEN || null,
};- Set up environment variables (optional)
Create .env file:
GITHUB_TOKEN=your_github_personal_access_token- Run the bot
npm start- Scan QR Code
Open WhatsApp on your phone and scan the QR code displayed in the terminal.
whatsapp-github-notifier/
├── config.js # Configuration settings
├── utils.js # Utility functions
├── githubApi.js # GitHub API handler
├── messageFormatter.js # Message formatting
├── GitHubPoller.js # Polling logic
├── whatsappConnection.js # WhatsApp connection handler
├── index.js # Application entry point
├── package.json # Dependencies
└── README.md # Documentation
| Option | Description | Default |
|---|---|---|
OWNER |
GitHub repository owner | - |
REPO |
Repository name to monitor | - |
BRANCH |
Branch to track | main |
TARGET_JID |
WhatsApp number (format: 628xxx@s.whatsapp.net) | - |
POLL_INTERVAL |
Check interval in milliseconds | 60000 (1 min) |
MAX_RETRIES |
Maximum retry attempts on failure | 3 |
RETRY_DELAY |
Delay between retries (ms) | 5000 |
GITHUB_TOKEN |
GitHub Personal Access Token | null |
To get your WhatsApp JID (number format):
- Your number:
+62 812-3456-7890 - Remove spaces and hyphens:
6281234567890 - Add
@s.whatsapp.net:6281234567890@s.whatsapp.net
For higher API rate limits (5000 requests/hour vs 60):
- Go to GitHub Settings > Developer settings > Personal access tokens
- Generate new token (classic)
- Select scope:
public_repoorrepo - Copy token and add to
.envfile
╭─ NEW COMMIT ─╮
│
├ 📦 Repo: YourRepo
├ 🔖 SHA: a1b2c3d
├ 👤 Author: username
├ 🕐 06/10/25, 14:30
│
├ 📊 Stats:
│ • 3 files changed
│ • 45 additions (+)
│ • 12 deletions (-)
│
├ 💬 Message:
│ Fix: Update authentication logic
│
╰─ 🔗 https://github.com/...
# Start the bot
npm start
# Development mode with auto-reload
npm run devThe bot provides real-time statistics:
- Total API checks performed
- Number of new commits detected
- Error count
- Uptime duration
Stats are printed every 30 minutes automatically.
- Check if polling is active in console
- Verify GitHub repository settings
- Check rate limit status
- Ensure WhatsApp is connected
- Delete
sessionfolder - Restart the bot
- Scan new QR code
- Check internet stability
- Verify WhatsApp phone is online
- Check if phone number is not logged in elsewhere
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Baileys - WhatsApp Web API
- GitHub REST API - Repository data
- Node.js - Runtime environment
For questions or support, please open an issue on GitHub.
If you find this project useful, please consider giving it a star!
Made with ❤️ by Vryptt - VryptLabs