Skip to content

meistrari/prai@v1

Latest
Compare
Choose a tag to compare
@herniqeu herniqeu released this 19 Nov 00:13
· 1 commit to main since this release
c2e6afa

PRAI v1.0.0

Overview

PRAI is a GitHub Action that leverages AI to provide automated code reviews. It performs comprehensive pull request analysis using either OpenAI's GPT-4 or Anthropic's Claude, delivering structured feedback directly in your PR workflow.

Features

  • Dual-phase analysis: context-aware PR evaluation and detailed file review
  • Support for OpenAI GPT-4 and Anthropic Claude
  • Severity-based issue categorization
  • GitHub-native suggestion blocks
  • Customizable review rules via cookbook
  • Skip validation option with // @skip-validation

Usage

name: AI Code Review
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: meistrari/prai@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          AI_PROVIDER: "openai"  # or "anthropic"
          COOKBOOK_URL: ${{ secrets.COOKBOOK_URL }}

Configuration

Input Description Required Default
GITHUB_TOKEN GitHub token Yes -
OPENAI_API_KEY OpenAI API key No -
ANTHROPIC_API_KEY Anthropic API key No -
AI_PROVIDER AI provider selection No openai
COOKBOOK_URL Review rules URL No Default rules