project_viewer.sh
user@portfolio:~$ cat bse-github-bot.project

BSE GITHUB BOT

Telegram bot for automated GitHub PR management and Vercel deployment monitoring with real-time notifications

[STATUS] completed
[TYPE] tool
[DATE] 04.11.2025

[TECH_STACK]

Python Flask python-telegram-bot GitHub API Vercel API Webhooks asyncio REST APIs
[PROJECT_DETAILS]

BSE GitHub Bot

An intelligent Telegram bot that streamlines development workflows by automating GitHub pull request management and providing real-time Vercel deployment monitoring. The bot serves as a unified interface for team members to manage code deployments and track application status directly from Telegram.

Key Features

  • PR Management - Merge GitHub pull requests remotely via simple Telegram commands
  • Deployment Monitoring - Track Vercel deployments with two approaches: real-time webhooks or periodic polling
  • Real-time Notifications - Automatic alerts for deployment status changes (READY, BUILDING, ERROR)
  • Rich Deployment Info - Displays deployment URL, branch, commit message, status, and timestamp
  • Webhook Integration - Dual webhook system for both Telegram and Vercel events
  • Hybrid Architecture - Seamless sync/async bridge between Flask and asyncio for optimal performance
  • Health Monitoring - Simple health check commands to verify bot status

Technical Implementation

Built with a sophisticated dual-server architecture running Flask HTTP server for webhooks alongside the Telegram bot interface. The implementation uses a custom asyncio event loop management pattern that bridges Flask’s synchronous nature with python-telegram-bot’s asynchronous operations.

The bot leverages asyncio.run_coroutine_threadsafe() to safely queue async operations from synchronous webhook handlers, ensuring non-blocking execution. This architecture allows the bot to handle multiple concurrent webhook events from Vercel while processing Telegram commands.

Deployment monitoring supports both push (webhook) and pull (polling) patterns, with intelligent deduplication using deployment IDs stored in bot context. The polling system runs as a scheduled job every 5 minutes, making it resilient to webhook failures.

Use Cases

Ideal for development teams that need to:

  • Merge pull requests without leaving Telegram
  • Monitor production deployments in real-time
  • Get immediate alerts when deployments succeed or fail
  • Track deployment history and status from mobile devices
  • Coordinate releases within team chat channels
  • Reduce context switching between tools during deployments

Development Status

The bot is production-ready and actively used for managing deployments and pull requests.

EOF: Data loaded