Bot for SysBlok ("Системный Блокъ") editorial processes automatization.
- You might need to set up
ru_RU.UTF-8
locale. To do that, runsudo locale-gen "ru_RU.UTF-8"
sudo dpkg-reconfigure locales
- Create a testing bot through BotFather and obtain the token.
- Create
config_override.json
in the same directory and put sensitive tokens there (you can copypaste fromconfig.json
first). Do not pushconfig_override.json
to the repo!- Run
export INFRA_HOST=<SYSBLOK_INFRA_HOST>
, putting in the actual URL - Run
sh get_keys.sh
. This will downloadconfig_override.json
andconfig_gs.json
to your folder.
- Run
- Replace
YOUR_CHAT_ID
,YOUR_USERNAME
andBOT_TOKEN
with appropriate values pip install -e .
pip install -r requirements.txt
pre-commit install
- If access to Telegram servers is restricted by your internet provider: install and run any VPN service
python3 app.py
- Fork the repo.
- Clone your forked repo to your local workspace.
- Create a branch from
dev
. You'll need to do it for every new feature or bugfix. - Write code in your local repo.
- Run pre-checks locally and write tests (if applicable).
- Create a pull request from your branch to
dev
and ask for relevant approval. It is not strictly necessary to get an approval, but please do that. - Merge into
dev
branch after approval. This merge triggers tests checks, test docker push and updating of a test bot (not yet). - When
dev
branch is stable, manually tested and tests are green, commits go fromdev
tomaster
. If checks are successful, production bot will update. See Github Actions tab to check CI status.
pycodestyle --max-line-length=100 .
checks pep8 compliance.pytest
runs tests.