Skip to content

Simple release monitor for GitHub repositories based on telegram bot

License

Notifications You must be signed in to change notification settings

soltanoff/go_github_release_monitor_bot

Repository files navigation

GitHub Release Monitor bot

Telegram Bot API MIT License

Simple release monitor for GitHub repositories based on telegram bot.

You may try it on telegram - here :)

Command list

  • /help - view all commands
  • /start - base command for user registration
  • /my_subscriptions - view all subscriptions
  • /subscribe - [GitHub repo urls] subscribe to the new GitHub repository
  • /unsubscribe - [GitHub repo urls] unsubscribe from the GitHub repository
  • /remove_all_subscriptions - remove all exists subscriptions
Examples here /subscribe https://github.com/sqlalchemy/sqlalchemy

FYI: bot will send you info about updates automatically.

subscribe_example.jpg

fetch_example.jpg

Config and environments variable

Config based on .env creation or set env-variables as you like (example: .env.default)

TELEGRAM_API_KEY

  • Find BotFather account
  • Create a new bot
  • Generate API token and put it to config

SURVEY_PERIOD

This parameter is used to set the polling frequency for all url addresses. Default 1 hour.

FETCHING_STEP_PERIOD

This setting is used to set a timeout between each API request to prevent the rate limit from failing. Default 1 minute.

How to run

Without Docker:

  • Make virtual environment
  • Install package requirements
  • Create .env or set env-variables as you like (example: .env.default)
  • Run it

With Docker

Development tools

Makefile: Makefile

golangci-lint

golangci-lint is a fast Go linters runner. It runs linters in parallel, uses caching, supports yaml config, has integrations with all major IDE and has dozens of linters included.

Config: .golangci.yml

Run:

make lint

gofumpt

gofumpt - enforce a stricter format than gofmt, while being backwards compatible. That is, gofumpt is happy with a subset of the formats that gofmt is happy with.

Run:

make format

gci

gci - is a tool that controls Go package import order and makes it always deterministic.

Run:

make format

My subscriptions