-
Notifications
You must be signed in to change notification settings - Fork 79
Description
Track
Creative Apps (GitHub Copilot)
Project Name
copilot-code-reviewer
GitHub Username
Pawan1979
Repository URL
https://github.com/Pawan1979/copilot-code-reviewer
Project Description
CodeReview Agent is an AI-powered chatbot assistant that reviews your code in real time using GitHub Copilot Chat. It detects bugs, security vulnerabilities, and code smells — and suggests clean, refactored alternatives along with ready-to-use unit test stubs.
Designed for developers who want instant, actionable code feedback without waiting for a PR review.
Demo Video or Screenshots
Primary Programming Language
Python
Key Technologies Used
-Visual Studio Code
-Visual Studio code Github Copilot Chat
-Open AI LLM
Submission Type
Individual
Team Members
No response
Submission Requirements
- My project meets the track-specific challenge requirements
- My repository includes a comprehensive README.md with setup instructions
- My code does not contain hardcoded API keys or secrets
- I have included demo materials (video or screenshots)
- My project is my own work with proper attribution for any third-party code
- I agree to the Code of Conduct
- I have read and agree to the Disclaimer
- My submission does NOT contain any confidential, proprietary, or sensitive information
- I confirm I have the rights to submit this content and grant the necessary licenses
Quick Setup Summary
- Clone the repo
git clone https://github.com/pawan1979/codereview-agent.git
cd codereview-agent - Install dependencies
pip install -r requirements.txt - Set your Open AI Key
cp .env.example .env
Edit .env and add your OPENAI_API_KEY
- Run the agent
Interactive chat mode
python agent.py
Review a specific file
python agent.py --file path/to/your/code.py
Review an inline snippet
python agent.py --code "def divide(a,b): return a/b"
Save review to JSON (great for CI pipelines)
python agent.py --file app.py --output review.json
Technical Highlights
CodeReview Agent is an AI-powered chatbot assistant that reviews your code in real time using GitHub Copilot Chat. It detects bugs, security vulnerabilities, and code smells — and suggests clean, refactored alternatives along with ready-to-use unit test stubs.
Designed for developers who want instant, actionable code feedback without waiting for a PR review.
Feature | Description -- | -- 🐛 Bug Detection | Identifies logic errors, null pointer risks, edge cases 🔒 Security Scanning | Flags SQL injection, hardcoded secrets, unsafe I/O 💡 Refactoring Tips | Suggests cleaner, more idiomatic rewrites 🧪 Test Stubs | Generates pytest/unittest stubs automatically 📂 File Review | Review any local file directly from the CLI 💬 Chat Mode | Conversational REPL — ask follow-up questions 🔁 CI Integration | Single-shot mode for use in GitHub Actions pipelines
copilot-code-reviewer/
└── agent.py # Core agent: CodeReviewAgent class + CLI
└── test_agent.py # pytest test suite (10+ tests)
├── instructions.md # GitHub Copilot repo instructions
└── ci.yml # CI pipeline (Python 3.10/3.11/3.12)
├── .env.example # Credential template
├── requirements.txt
└── README.md
The agent connects to GitHub's Models Inference endpoint (https://models.inference.ai.azure.com) using your GITHUB_TOKEN. This is the production GitHub Copilot Chat API — the same one powering Copilot in VS Code and the CLI.
User Input
│
▼
CodeReviewAgent (Python)
│ Builds structured prompt with SYSTEM_PROMPT + conversation history
▼
GitHub Copilot Chat API ──► gpt-4o (or gpt-4o-mini)
│
▼
Structured Review Output
📋 Summary | 🐛 Issues | 💡 Suggestions | ✅ Refactor | 🧪 TestsChallenges & Learnings
Learned how Github Copilot can help to write a complex application from vibe coding.
Contact Information
www.linkedin.com/in/ pawankumarshukla Vanity URL name
Country/Region
India