# Setup ## 1) Create the repository and bot user 1. Create `Bram/gitea-pr-review-bot`. 2. Create the dedicated Gitea user `comedykit-pr-bot`. 3. Create a PAT for that user with scopes: - `write:repository` - `write:issue` ## 2) Configure secrets Create `.env` from `.env.example` and set: - `CURSOR_API_KEY` - `GITEA_TOKEN` - `GITEA_BASE_URL` - `GITEA_BOT_LOGIN` - `WEBHOOK_SECRET` - `PORT` ## 3) Install and run locally ```bash npm install npm run dev ``` Health check: ```bash curl http://localhost:8787/healthz ``` ## 4) Configure Gitea webhook Add an organization webhook for `Bram` (or per repo for pilot) with: - URL: `https:///webhooks/gitea` - Secret: matches `WEBHOOK_SECRET` - Events: - `pull_request` - `pull_request_review_request` ## 5) Pilot rollout Start with: - `comedykit-frontend-new` - `comedykit-backend-new` After validation, enable org webhook for remaining `Bram/*` repositories and use `.gitea/pr-review-bot.yml` for per-repo opt-out.