Receive push
events from GitHub repository in Telegram bot
Run make install
for installation. If you don't have make
installed, run commands from install
action in Makefile
This application has some required and optional environment variables to set
TELEGRAM_BOT_TOKEN
- token of Telegram bot. Documentation for Telegram botsTELEGRAM_CHAT_ID
- chat id to send messages to. Get it from@my_id_bot
in Telegram for example
GITHUB_WEBHOOK_SECRET
- secret part of your webhook URL. Default issecret
FASTAPI_OPENAPI_URL
- path to OpenAPI schema. More about that in FastAPI documentation. Empty by default
Run make run
to run application an your local machine. If you don't have make
installed, run commands from run
action in Makefile
To run application on a server you probably want to run something like this
gunicorn --chdir src main:app -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000
This whould run you application in port 8000
. More about that in Gunicorn documentation
To run this application with docker use docker run
command similar to this
docker run -p 8000:8000 -e TELEGRAM_BOT_TOKEN=<TELEGRAM_BOT_TOKEN> -e TELEGRAM_CHAT_ID=<TELEGRAM_CHAT_ID> -d mishankov/github-push-events-telegram-bot:latest
Configure GitHub repository to send events about push events to /github/repository/webhook/{GITHUB_WEBHOOK_SECRET}/
path on your server. More about that in GitHub webhooks documentation