This commit is contained in:
Daan Schouteden
2026-06-02 11:39:41 +02:00
commit 3d0e28f427
27 changed files with 3426 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
# 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://<bot-host>/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.