-
clone
git clone https://github.com/rohit1kumar/pr-agent.git && cd pr-agent
-
create
.env
usingcp .env.example .env
and update the valuesOPENAI_API_KEY=your_openai_token
-
run
docker-compose up --build
to start the services
API docs are available at http://localhost:8000/docs
-
Create task
curl --request POST \ --url http://localhost:8000/analyze-pr \ --header 'content-type: application/json' \ --data '{ "repo_url": "<repo_url>", "pr_number": "<pr_number>", }'
-
Get status (use task_id from step 1)
curl --request GET \ --url http://127.0.0.1:8000/status/<task_id> \ --header 'content-type: application/json'
-
Get result (use task_id from step 1)
curl --request GET \ --url http://127.0.0.1:8000/results/<task_id> \ --header 'content-type: application/json'
- FastAPI for the API server with redis based rate limiting
- Celery for background tasks and Redis as a message broker & backend
- OpenAI API for the AI model
- Docker for containerization
- Adding better AI models for better code analysis
- Creating GitHub App & responding to PRs using webhooks
- Docker configuration
- Result caching system
- Structured logging
- Multi-language support
- Rate limiting
- GitHub webhook support
- Live deployment (e.g., Railway, Render, etc.)