Files
ci-ai/bot

ci-ai-bot — interaktiver Gitea-Webhook-Bot

Feature F der ci-ai-Schicht: ein schlanker FastAPI-Dienst, der auf Gitea-Webhooks reagiert und in Sekunden antwortet — ohne Runner, Clone oder NAT-Hairpin.

  • @ci-ai <Frage> in einem Issue/PR → Chat-Antwort im Thread (Thread- + Diff-Kontext).
  • pull_request opened/synchronized/reopened → idempotentes KI-Review.

Läuft als Container neben Gitea (web_network): Gitea-API intern über http://gitea:3000, KI-Backend (Jetson-Ollama) LAN-direkt. Wiederverwendet ../scripts/{llm,gitea_api,ai_review}.py.

Bauen (vom Repo-ROOT, nicht aus bot/)

docker build -f bot/Dockerfile -t ci-ai-bot:latest .

Der Dockerfile kopiert scripts/ + bot/app.py → Build-Context muss das Repo-Root sein.

Env

BOT_NAME · WEBHOOK_SECRET (HMAC) · GITEA_TOKEN · GITEA_API (intern http://gitea:3000/api/v1) · AI_PROVIDER / AI_MODEL / AI_BASE_URL (Jetson). Endpunkte: GET /healthz, POST /webhook.

Deployment

Als Service im docker_stack des Repos ansible-eulernest — Compose-Service, Vars, der nötige Gitea-ALLOWED_HOST_LIST-Fix, Webhook-Einrichtung und Troubleshooting stehen dort in docs/ci-ai-bot.md. Siehe auch die bot/-Sektion in der Haupt-README.