Update README.md

This commit is contained in:
pacnpal
2024-12-24 10:56:46 -05:00
committed by GitHub
parent 52219d4d98
commit 6a73dbfff6

View File

@@ -13,28 +13,40 @@ A GitHub Action that performs automated code reviews using Claude AI.
Add this to your GitHub workflow file (e.g. `.github/workflows/review.yml`): Add this to your GitHub workflow file (e.g. `.github/workflows/review.yml`):
```yaml ```yaml
name: Code Review name: Claude Code Review
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
review:
runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
pull-requests: write pull-requests: write
on:
# Run on new/updated PRs
pull_request:
types: [opened, reopened, synchronize]
# Allow manual triggers for existing PRs
workflow_dispatch:
inputs:
pr_number:
description: 'Pull Request Number'
required: true
type: string
jobs:
code-review:
runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: pacnpal/claude-code-review-action@v1 - name: Run Claude Review
uses: pacnpal/claude-code-review@v1.0.6
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
anthropic-key: ${{ secrets.ANTHROPIC_API_KEY }} anthropic-key: ${{ secrets.ANTHROPIC_API_KEY }}
pr-number: ${{ github.event.pull_request.number }} pr-number: ${{ github.event.pull_request.number || inputs.pr_number }}
``` ```
## Setup ## Setup