An automated code review bot that integrates with GitHub to provide AI-powered feedback on pull requests.
producer/- Webhook listener that enqueues PR analysis jobsconsumer/- Worker that processes jobs and posts reviews
- Python 3.8+
- RabbitMQ server
- Ollama with Qwen model
- ngrok (for webhook testing)
- Install dependencies for both services:
cd publisher
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your values
cd ../consumer
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your values- Start RabbitMQ:
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management- Pull Qwen Model
ollama pull qwen2.5-coder:latest
ollama serve- Start Services
# Terminal 1: Publisher
cd producer
python run_publisher.py
# Terminal 2: Consumer
cd consumer
python run_consumer.py
- Expose Webhook with Ngrok
ngrok http 8000- GitHub webhook integration
- RabbitMQ job queue with retry logic
- Dead letter queue support
- AI-powered code review with Qwen LLM
- GitHub PR comment posting
- Line-by-line comments
- Security scanning
- Custom rule engine
- LoRA fine-tuning support
