generated from ztimson/template
Updated readme
This commit is contained in:
2
.github/workflows/review.yml
vendored
2
.github/workflows/review.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: AI Code Review
|
name: Code review
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
|
|||||||
34
README.md
34
README.md
@@ -54,8 +54,40 @@ Automated code reviewer that uses AI to analyze git diffs and provide inline com
|
|||||||
</summary>
|
</summary>
|
||||||
|
|
||||||
#### Instructions
|
#### Instructions
|
||||||
1. Add the following to your gitea build:
|
1. Add the following git action:
|
||||||
```yaml
|
```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 }}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user