⚠️ Warning: This project is vibe coded. Use at your own risk.
A Telegram bot that monitors GitHub repositories for new Pull Requests, tracks their review status via emojis or commands, and automatically cleans up closed or merged PRs.
- Automated Monitoring: Checks for new PRs in configured repositories every minute.
- Review Tracking: Uses Telegram reactions or commands to track review status.
- ❤️ /
/review- Mark as "Reviewing" - 👍 /
/approve- Mark as "Approved" - 👌 /
/comment- Mark as "Commented" - 😭 /
/giveup- Unassign self from review - 💯 /
/merge- Mark as "Merged" - 🍳 /
/draft- Toggle "Draft" status - 🙏 /
/addressed//rereview- Request re-review (clears previous comments)
- ❤️ /
- Real-Time Synchronization: The bot periodically syncs with GitHub to fetch the latest:
- Review statuses (Approved, Changes Requested, Commented)
- Draft status
- This ensures the message always reflects the actual state on GitHub, treating GitHub as the source of truth.
- Interactive Updates: The bot updates the message text in real-time to reflect the current status (Reviewers, Approvals, Changes Requested, Comments).
- Auto-Cleanup: Automatically deletes messages for PRs that are closed or merged on GitHub.
- Link Parsing: If a user posts a GitHub PR link, the bot can replace it with a tracked message (via
/upgradeor auto-detection).
- Rust (latest stable)
- SQLite (if running locally without Docker)
- A Telegram Bot Token (from @BotFather)
- A GitHub Personal Access Token (PAT)
GITHUB_REPOS: Comma-separated list of repositories to fully monitor (automatic new PR alerts + interactive tracking).GITHUB_IGNORED_REPOS: Comma-separated list of repositories to ignore for automatic alerts.- New PRs will NOT be auto-posted.
- However, you can still manually track PRs from these repos by replying to a link with
/upgradeor pasting the link if auto-link-detection is enabled.
Environment variables:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
GITHUB_TOKEN=your_github_pat
TELEGRAM_CHAT_ID=target_chat_id
GITHUB_REPOS=owner/repo1,owner/repo2
GITHUB_IGNORED_REPOS=owner/repo3,owner/repo4
DATABASE_URL=sqlite:bot.db
RUST_LOG=info# Install dependencies
cargo build
# Run the bot
cargo run# Build the image
docker build -t tg-bot .
# Run the container
docker run -d \
--env-file .env \
-v $(pwd)/data:/app/data \
tg-bot- Add the bot to your Telegram group (defined by
TELEGRAM_CHAT_ID). - New PRs will automatically appear in the chat.
- React to the messages to change their status:
- Click ❤️ to add yourself as a reviewer.
- Click 👍 to approve.
- Click 👌 to indicate you've commented.
- Click 🙏 to request a re-review (this clears the comment list).
- Click 💯 to manually mark as merged (though the bot auto-checks this too).
- Commands:
- Reply to a bot message with
/addressedto request a re-review. - Reply to a raw GitHub link with
/upgradeto convert it into a tracked bot message. - Send
/helpto see the full list of commands.
- Reply to a bot message with
The project is built with:
- Teloxide: For Telegram bot API interactions.
- Octocrab: For GitHub API interactions.
- SQLx: For SQLite database persistence.
- Tokio: For async runtime and task scheduling.