- Publisher: пуши по одному (lock), fetch → проверка конфликта с base_sha → чистое дерево origin/main → черновик → коммит от tgit-bot с трейлером Telegram-User → push; отказ push → rebase и повтор (до 3 раз); защита от путей вне клона; лимит 20 пушей/час - «💬 Сообщение коммита» (1–200 символов, первая строка ≤ 72) и «🚀 Push» с подтверждением; исходы: запушено (sha, ссылка, ⏳ CI) · конфликт → «Перезаписать» · нечего коммитить · лимит · сбой - запись в pushes (chat_id, message_id — для обновления статуса CI/CD в #11), черновик очищается - ruff: RUF001–003 выключены — кириллица в текстах это норма Refs #9 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
69 lines
1.5 KiB
TOML
69 lines
1.5 KiB
TOML
[project]
|
|
name = "tgit"
|
|
version = "0.1.0"
|
|
description = "Telegram bot: commit to a SourceCraft repo, CI/CD notifications, container status, logs with an LLM agent, alerts"
|
|
requires-python = ">=3.12,<3.13"
|
|
dependencies = [
|
|
"aiogram>=3.13",
|
|
"httpx>=0.27",
|
|
"pydantic>=2.8",
|
|
"pydantic-settings>=2.4",
|
|
"sqlalchemy[asyncio]>=2.0.32",
|
|
"asyncpg>=0.29",
|
|
"alembic>=1.13",
|
|
"pyyaml>=6.0",
|
|
"regex>=2024.7",
|
|
"segno>=1.6",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"ruff>=0.6",
|
|
"mypy>=1.11",
|
|
"types-pyyaml>=6.0",
|
|
"pytest>=8.3",
|
|
"pytest-asyncio>=0.24",
|
|
"pytest-cov>=5.0",
|
|
"respx>=0.21",
|
|
"aiosqlite>=0.20",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["app"]
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
target-version = "py312"
|
|
extend-exclude = [".claude", "docs"]
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "B", "UP", "SIM", "ASYNC", "RUF"]
|
|
# Russian UI texts, commit messages and comments are normal here, not homoglyph attacks
|
|
ignore = ["RUF001", "RUF002", "RUF003"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
strict = true
|
|
packages = ["app"]
|
|
plugins = ["pydantic.mypy"]
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
testpaths = ["tests"]
|
|
|
|
[tool.coverage.run]
|
|
source = ["app"]
|
|
branch = true
|
|
omit = ["app/__main__.py"]
|
|
|
|
[tool.coverage.report]
|
|
show_missing = true
|
|
skip_covered = true
|
|
# Ratchet: raise as code lands, never lower. Target by M4 — 70 (SPEC §5.2).
|
|
fail_under = 80
|