Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

A telegram bot to broadcast notification for pr-demon

License

Notifications You must be signed in to change notification settings

GovTechSG/pr-demon-telegram-bot

 
 

Repository files navigation

pr-demon-telegram-bot

A telegram bot that listens to the WS of the pr-demon and broadcast the status of the test.

Details on pr-demon, please refer to https://github.com/lawliet89/pr_demon

Getting started

Add a docker_env file at project root level (same level as Dockerfile). It looks like:

TELEGRAM_TOKEN=[key_without_[]]
RECIPIENTS=[key_without_[]]
LRU_COUNT=10

Make sure you have docker and docker-compose installed.

Run docker-compose up --build -d at project root level.

Config

You can use any broadcasters, just add the broadcaster to the telegram group and set your bot's token in TELEGRAM_TOKEN.

When you want to subscribe your telegram group to this bot, you need to get your group's chat id and add it to RECIPIENTS. RECIPIENTS is a string which will be split by '|'. Adding multiple recipients looks like this:

RECIPIENTS=7235478283|7235478281|7235478280

LRU_COUNT set the max size of the LRU Cache that will be use to store the state of the PR test

TODO

Add rescue for Telegram::Bot::Exceptions::ResponseError Send alert when bot goes down

About

A telegram bot to broadcast notification for pr-demon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%