An AI-powered Pull Request reviewer and chatbot that provides:
- Automated code reviews with inline comments
- A chatbot interface to discuss code changes
- Security scanning with Semgrep
- Summarizes PR changes for quick understanding
- Performs in-depth code analysis on modified files
- Identifies potential bugs, security issues, and performance concerns
- Posts reviews as both summary comments and inline feedback
- Chat about code changes directly in PR comments
- Ask questions about specific files or functionality
- Get explanations of complex parts of the PR
- Simply comment with
/aifollowed by your question
When a PR is opened or updated, the AI will automatically:
- Generate a summary of changes
- Review each modified file
- Post review comments
- Add a chatbot introduction comment
To chat with the AI about the code changes:
- Comment on the PR with
/aifollowed by your question- Example:
/ai What does the change in utils.py do? - Example:
/ai Are there any performance concerns with this approach?
- Example:
- The AI will respond with a comment addressing your question
# Install dependencies
pip install -r requirements.txt
# Run a review on a PR
python pr_tool.py --pr-url "https://github.com/owner/repo/pull/123"
# Start an interactive chat session about a PR
python pr_tool.py --pr-url "https://github.com/owner/repo/pull/123" --chat
# Monitor PR comments for chatbot commands
python pr_tool.py --pr-url "https://github.com/owner/repo/pull/123" --monitor- Python 3.10+
- GitHub API token with PR access
- Ollama (for running the AI model locally)