Agentic system that receives webhooks from GitLab to auto-review MRs using GPT through the OpenAI API.
Documentation:
- CLAUDE.md - Development commands and project structure
- DESIGN.md - Architecture and design decisions
- PLAN.md - Roadmap and future features
GitLab Webhook → Server → Redis Queue → Scheduler → K8s Job (Worker)
↓
GPT API worker
↓
GitLab API
- Server: Receives GitLab webhooks, queues review jobs
- Worker: Runs a GPT agent for MR review in ephemeral K8s Jobs
- CLI: Queue management and manual testing
cargo build --releaseEnvironment variables:
| Variable | Description | Default |
|---|---|---|
REDIS_URL |
Redis connection URL | redis://127.0.0.1:6379 |
WEBHOOK_SECRET |
GitLab webhook token | (required) |
LISTEN_ADDR |
Server listen address | 0.0.0.0:8443 |
GITLAB_TOKEN |
GitLab API token (worker) | (required) |
OPENAI_API_KEY |
OpenAI API key (worker) | (required) |
OPENAI_MODEL |
OpenAI model for worker GPT calls | gpt-5.4-mini |
OPENAI_API_BASE |
OpenAI API base URL | https://api.openai.com/v1 |
CLAUDE_CODE_OAUTH_TOKEN |
Legacy Claude OAuth token kept during migration | (optional) |
See k8s/ directory for Kubernetes manifests.
kubectl apply -k k8s/# Show queue stats
claude-agent stats
# List failed items
claude-agent list --failed
# Retry a failed job
claude-agent retry <job-id>
# Clear failed items
claude-agent clear-failed
# Manually queue a review
claude-agent queue \
--gitlab-url https://gitlab.com \
--project group/project \
--mr-iid 123 \
--clone-url https://gitlab.com/group/project.git \
--source-branch feature \
--title "My MR" \
--author username- Create a webhook in GitLab project settings
- URL:
https://your-domain/webhook/gitlab - Secret Token: Match
WEBHOOK_SECRETenv var - Trigger: Merge request events
- SSL verification: Enable
MIT