Built a Local AI Code Reviewer with Ollama | Private & Open Source 🚀
说明与用途
使用 Ollama 和 Qwen2.5‑Coder 的本地 AI 审查器,自动审查 PR,约 2 分钟内发现错误,保持代码私密并节省审查时间。
问题
Code reviews are essential but draining; reviewing every changed line of a PR is time‑consuming and can let issues slip through.
结果
The reviewer posted a review in about 2 minutes, identified two real bugs, and eliminated the 15–20 minute manual first‑pass review.
工作流
- Configure .env with OLLAMA_MODEL and GITHUB_TOKEN
- Run the Python script managed by uv
- Ollama serves the Qwen2.5‑Coder model via /api/chat in JSON mode
- GitHub REST API reads PR diffs and posts review comments
- Reviewer runs continuously while the developer works
- Developer reviews AI‑generated comments and focuses on design decisions
证据
Local AI PR Reviewer does the first pass for you. It watches your chosen repos, reviews every new or updated PR with a local open-weight model on Ollama, and posts senior-engineer-style feedback: critical issues, why they matter, and suggested fixes.
I ran it on my own demo repo this week. On the note deletion and search PR, it posted a review in about 2 minutes without me opening a single file, and caught two real bugs: a missing useEffect cleanup and unhandled errors in deleteNote.
Reviews are generated by Qwen2.5-Coder, an open-weight coding model, running locally through Ollama.
- 记录日期: 2026-10-22T09:11:28.772Z