First MVP

This commit is contained in:
Space-Banane
2026-05-22 19:25:57 +02:00
parent 673f70b32a
commit 860ccb731d
40 changed files with 2336 additions and 0 deletions

46
.env.example Normal file
View File

@@ -0,0 +1,46 @@
# Base URL of your self-hosted Gitea instance.
GITEA_BASE_URL=https://gitea.reversed.dev
# Bot account token used to read PRs and write comments.
GITEA_TOKEN=replace
GITEA_BOT_USERNAME=codex-bot
# Shared secret configured on the Gitea webhook.
GITEA_WEBHOOK_SECRET=replace
# OpenAI API credentials for Codex review generation.
OPENAI_API_KEY=replace
OPENAI_PROJECT_ID=
OPENAI_ORG_ID=
# Comma-separated allowlist of repositories this bot may process.
# Example: space/gitea-codex,space/another-repo
ALLOWED_REPOS=space/gitea-codex
COOLDOWN_SECONDS=60
# WEBHOOK_MODE is informational for your deployment model:
# - repo: you configured repository-level webhooks in Gitea.
# - global: you configured one instance-level/admin webhook in Gitea.
# This bot does NOT auto-provision webhooks. Admin config is manual.
WEBHOOK_MODE=repo
DB_HOST=mariadb
DB_PORT=3306
DB_NAME=gitea_codex
DB_USER=gitea_codex
DB_PASSWORD=replace
WORKDIR=/var/lib/gitea-codex/worktrees
MAX_DIFF_BYTES=200000
MAX_REVIEW_MINUTES=10
CONCURRENCY=1
# Image used for ephemeral job containers (Node + npm + Codex CLI install).
REVIEW_RUNNER_IMAGE=node:22-bookworm-slim
# Keep false for review-only mode.
ENABLE_FIX_COMMANDS=false
# Security: fork PRs are skipped unless explicitly enabled.
ALLOW_UNTRUSTED_FORKS=false