This is a Telegram bot that monitors the releases of given repos, sending messages upon a new release.
If you don't need a local installation you can use public bot, avalaible at https://t.me/janisreleasebot.
This bot is inspired by new(releases), Github releases notify bot and release-bot.
Other similar tools:
- Easy subscription to repo by owner/name, GitHub/PyPI/npm URL or uploading requirements.txt or package.json file
- Rich markdown formatting for release note
- Auto subscription to starred repos
- Ready for self-hosting, has docker image
- Work locally, without white IP and domain name
- Only Telegram token required
/start
- show welcome message
/about
- information about this bot
/help
- brief usage info
/list
- show your subscriptions
/editlist
- show and edit your subscriptions
/starred username
- subscribe to user's starred repos
/starred
- unsubscribe from user's starred repos
/settings
- change output format
/stats
- basic server statistics
- Python 3.12
- Flask
- telegramify_markdown
- python-telegram-bot
- PyGithub
- APScheduler via Flask-APScheduler
- SQLAlchemy via Flask-SQLAlchemy
- Alembic via Flask-Migrate - SQLAlchemy database migrations
Using docker compose:
services:
release-bot:
container_name: release-bot
image: ghcr.io/janisv/release-bot:latest
restart: unless-stopped
environment:
- TELEGRAM_BOT_TOKEN=<telegram_token>
#- GITHUB_TOKEN=<github_token> # optional
#- SITE_URL=https://<your_domain_name> # optional
ports:
- 5000:5000
volumes:
- /path/to/data:/app/data
or docker run:
docker run -p 5000:5000 -e TELEGRAM_BOT_TOKEN="<telegram_token>" -v /path/to/data:/app/data -d --name release-bot ghcr.io/janisv/release-bot:latest
Look at Development section
TELEGRAM_BOT_TOKEN
- get this from BotFather. You'll need to create a bot.
GITHUB_TOKEN
- (optional) GitHub personal access token (classic) or fine-grained personal access token. When not specified working well for about 20 repos. More info at Rate limits for the REST API.
SITE_URL
- (optional) URL used for listening for incoming requests from the Telegram servers. When not specified uses polling insted webhooks. More info at Marvin's Marvellous Guide to All Things Webhook.
DATABASE_URI
- (optional) When not specified local SQLite uses.
MAX_REPOS_PER_CHAT
- (optional) Limit number of repos per user. Default 0 - unlimited.
Setup env vars and run:
pip3 install -r requirements.txt
flask db upgrade
python3 -m flask run -h 0.0.0.0
For use webhooks locally, you may want to use localhost.run.