This project contains simple automation to fetch new Github issues based on user criteria and send via Telegram.
The code is divided into three files:
# Main file
app.py
# Telegram functions
tg.py
# Database functions
firedb.py
The app
file runs the Flask web framework. When requested, it gets the data to build the query and send a call to Github API to fetch new issues. If any, it saves the new data and sends the issues by Telegram.
This project runs on a Docker container and is hosted on Google Cloud Platform.
Main GCP services currently being used:
Cloud Run - To host and run the container image
Container Registry - To save the container image
Cloud Firestore - Database
Cloud Scheduler - To run the program on a defined schedule
To create a Telegram Bot, follow instructions here.
It's important to export environment variables to correctly run the project.
GH_TOKEN="Your Github personal access token"
TELEGRAM_TOKEN="Telegram bot token"
TELEGRAM_USERID="Your Telegram user id"
GOOGLE_APPLICATION_CREDENTIALS="Service account credentials with required permissions"