This little TG-bot is your faithful guardian of the Code Universe! It secretly spies on GitHub repositories (even private ones, if you plant a token), throws stylish alerts into the channel. Juggles a bunch of repositories, scans cheerfully every 5 minutes and hides cozily in Docker with data persistence. A true Commit Master with a cosmic vibe!
🤖 Demo Bot: t.me/commiter_bot
🔧 Order server for bot: t.me/flabbycloud_bot
- 🔔 Real-time notifications about new commits
- 🔒 Admin-only access control
- 🔄 Automatic repository monitoring
- Persistent storage of repository data
- Node.js 18+
- GitHub Personal Access Token
- Telegram Bot Token
- Telegram Channel ID
- Admin Chat ID
Create a .env file in the root directory with the following variables:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
GITHUB_TOKEN=your_github_personal_access_token
ADMIN_CHAT_ID=your_telegram_chat_id
CHANNEL_ID=your_telegram_channel_id
CHECK_INTERVAL=300000 # Optional: interval in milliseconds (default: 5 minutes)- Clone the repository:
git clone <repository-url>
cd github-telegram-bot- Install dependencies:
npm install-
Create and configure the
.envfile as described above. -
Start the bot:
npm start- Start a conversation with your bot in Telegram
- Use the
/startcommand to verify your admin access - Add repositories to monitor using:
/addrepo owner/repository
Example: /addrepo microsoft/vscode
/start- Check if you have admin access/addrepo <owner/repo>- Add a new repository to monitor
├── data/ # Persistent storage
│ ├── repositories.json
│ └── lastCommits.json
├── services/
│ ├── githubService.js # GitHub API integration
│ └── telegramService.js # Telegram bot service
├── utils/
│ └── storage.js # Data storage utilities
├── config.js # Configuration management
├── index.js # Main application file
Commit notifications in the Telegram channel will appear in the following format:
🌱 repository-name
> Commit message
Additional commit description (if any)
- Built with Node.js
- Uses Grammy for Telegram Bot API
- Uses Octokit for GitHub API
- Configurable check interval (default: 5 minutes)
- Persistent storage using JSON files
This project is licensed under the MIT License.