48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
name: AI Code Review
|
|
|
|
on:
|
|
pull_request:
|
|
types: [ labeled, synchronize ]
|
|
|
|
jobs:
|
|
ai-review:
|
|
if: >-
|
|
(github.event.action == 'synchronized' && contains(toJSON(github.event.pull_request.labels), 'ai-review')) || contains(toJSON(gitea.event.changes.added_labels), 'ai-review')
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
AI_REVIEW_CONFIG_FILE_YAML: ./shared-prompts/iac/.ai-review.yaml
|
|
# VCS configuration
|
|
VCS__PROVIDER: GITEA
|
|
VCS__PIPELINE__OWNER: ${{ github.repository_owner }}
|
|
VCS__PIPELINE__REPO: ${{ github.event.repository.name }}
|
|
VCS__PIPELINE__PULL_NUMBER: ${{ github.event.pull_request.number }}
|
|
VCS__HTTP_CLIENT__API_URL: https://git.forteapps.net/api/v1
|
|
VCS__HTTP_CLIENT__API_TOKEN: ${{ secrets.AI_REVIEW_TOKEN }}
|
|
# Review — disable fallback to see real Gitea API errors
|
|
REVIEW__INLINE_COMMENT_FALLBACK: "false"
|
|
# LLM configuration
|
|
LLM__PROVIDER: CLAUDE
|
|
LLM__META__MODEL: claude-sonnet-4-20250514
|
|
LLM__META__MAX_TOKENS: "4096"
|
|
LLM__HTTP_CLIENT__API_URL: https://api.anthropic.com
|
|
LLM__HTTP_CLIENT__API_TOKEN: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
token: ${{ secrets.AI_REVIEW_TOKEN }}
|
|
|
|
- name: Run inline review
|
|
uses: docker://nikitafilonov/ai-review:v0.64.0
|
|
with:
|
|
args: ai-review run-inline
|
|
|
|
- name: Run summary review
|
|
uses: docker://nikitafilonov/ai-review:v0.64.0
|
|
with:
|
|
args: ai-review run-summary
|