Files
ai-agents/README.md
ztimson 97895096f3
Some checks failed
Code review / review (pull_request) Failing after 1s
Build and publish / Build Container (push) Successful in 59s
Fixed review build
2025-12-27 20:34:22 -05:00

4.0 KiB


Logo

AI Reviewer

Automated AI-powered code review for pull requests 🤖

Version Pull Requests Issues



Table of Contents

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

Docker JavaScript Node

Setup

Production

Instructions

  1. Add the following git action:
name: Code review
on:
	pull_request:
		types: [opened, synchronize, reopened]

jobs:
	review:
		runs-on: ubuntu-latest
		steps:
			- name: Fetch code
			  run: |
				  git clone "$(echo ${{github.server_url}}/${{github.repository}}.git | sed s%://%://${{github.token}}@% )" .
				  git checkout ${{ github.event.pull_request.head.sha }}
				  git fetch origin ${{ github.event.pull_request.base.ref }}

			- name: Run AI Review
			  run: |
				  REGISTRY="$(echo "${{github.server_url}}" | sed -E 's|https?://||')"
				  docker login -u "${{github.repository_owner}}" -p "${{secrets.DEPLOY_TOKEN}}" "$REGISTRY"
				  docker pull "$REGISTRY/zakscode/ai-reporter:latest"
				  docker run --rm \
				    -v $(pwd):/github/workspace \
				    -e AI_HOST=anthropic \
				    -e AI_MODEL=claude-sonnet-4-5 \
				    -e AI_TOKEN="${{ secrets.ANTHROPIC_TOKEN }}" \
				    -e GIT_HOST="${{ github.server_url }}" \
				    -e GIT_OWNER="${{ github.repository_owner }}" \
				    -e GIT_REPO="${{ github.event.repository.name }}" \
				    -e GIT_TOKEN="${{ secrets.ASSISTANT_TOKEN }}" \
				    -e GIT_BRANCH="origin/${{ github.event.pull_request.base.ref }}" \
				    -e PULL_REQUEST="${{ github.event.pull_request.number }}" \
				    "$REGISTRY/zakscode/ai-reporter:latest"

Development

Prerequisites

Instructions

  1. Install the dependencies: npm i
  2. Build library: npm run review

License

Copyright © 2025 Zakary Timson | All Rights Reserved | Available under MIT Licensing

See the license for more information.