generated from ztimson/template
117 lines
4.0 KiB
Markdown
117 lines
4.0 KiB
Markdown
<!-- Header -->
|
|
<div id="top" align="center">
|
|
<br />
|
|
|
|
<!-- Logo -->
|
|
<img src="https://git.zakscode.com/repo-avatars/d2c56ffd0220751c2f4a9f6fc1e8125a9a63aeed452ae4f4ab696c084330faa2" alt="Logo" width="200" height="200">
|
|
|
|
<!-- Title -->
|
|
### AI Reviewer
|
|
|
|
<!-- Description -->
|
|
Automated AI-powered code review for pull requests 🤖
|
|
|
|
<!-- Repo badges -->
|
|
[](https://git.zakscode.com/ztimson/ai-reviewer/tags)
|
|
[](https://git.zakscode.com/ztimson/ai-reviewer/pulls)
|
|
[](https://git.zakscode.com/ztimson/ai-reviewer/issues)
|
|
|
|
<!-- Links -->
|
|
---
|
|
<div>
|
|
<a href="https://git.zakscode.com/ztimson/ai-reviewer/releases" target="_blank">Release Notes</a>
|
|
• <a href="https://git.zakscode.com/ztimson/ai-reviewer/issues/new?template=.github%2fissue_template%2fbug.md" target="_blank">Report a Bug</a>
|
|
• <a href="https://git.zakscode.com/ztimson/ai-reviewer/issues/new?template=.github%2fissue_template%2fenhancement.md" target="_blank">Request a Feature</a>
|
|
</div>
|
|
|
|
---
|
|
</div>
|
|
|
|
## Table of Contents
|
|
- [AI Reviewer](#top)
|
|
- [About](#about)
|
|
- [Built With](#built-with)
|
|
- [Setup](#setup)
|
|
- [Production](#production)
|
|
- [License](#license)
|
|
|
|
## About
|
|
|
|
Automated code reviewer that uses AI to analyze git diffs and provide inline comments on pull requests. Supports Anthropic, OpenAI, and Ollama models with tool-based reviewing for precise feedback.
|
|
|
|
### Built With
|
|
[](https://docker.com/)
|
|
[](https://javascript.com/)
|
|
[](https://nodejs.org/)
|
|
|
|
## Setup
|
|
|
|
<details>
|
|
<summary>
|
|
<h3 id="production" style="display: inline">
|
|
Production
|
|
</h3>
|
|
</summary>
|
|
|
|
#### Instructions
|
|
1. Add the following git action:
|
|
```yaml
|
|
name: Code review
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
review:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout PR
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Fetch base branch
|
|
run: |
|
|
git fetch origin ${{ github.event.pull_request.base.ref }}
|
|
git branch -r
|
|
|
|
- name: Run AI Review
|
|
uses: docker://git.zakscode.com/zakscode/ai-reporter:latest
|
|
env:
|
|
AI_HOST: anthropic
|
|
AI_MODEL: claude-sonnet-4-5
|
|
AI_TOKEN: ${{ secrets.ANTHROPIC_TOKEN }}
|
|
GIT_HOST: ${{ github.server_url }}
|
|
GIT_OWNER: ${{ github.repository_owner }}
|
|
GIT_REPO: ${{ github.event.repository.name }}
|
|
GIT_TOKEN: ${{ secrets.ASSISTANT_TOKEN }}
|
|
GIT_BRANCH: origin/${{ github.event.pull_request.base.ref }}
|
|
PULL_REQUEST: ${{ github.event.pull_request.number }}
|
|
|
|
```
|
|
|
|
</details>
|
|
|
|
<details>
|
|
<summary>
|
|
<h3 id="development" style="display: inline">
|
|
Development
|
|
</h3>
|
|
</summary>
|
|
|
|
#### Prerequisites
|
|
- [Node.js](https://nodejs.org/en/download)
|
|
|
|
#### Instructions
|
|
1. Install the dependencies: `npm i`
|
|
2. Build library: `npm run review`
|
|
|
|
</details>
|
|
|
|
## License
|
|
|
|
Copyright © 2025 Zakary Timson | All Rights Reserved | Available under MIT Licensing
|
|
|
|
See the [license](./LICENSE) for more information.
|