Skip to content

Review action

Review action #7

Workflow file for this run

name: auto code review
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
review:
runs-on: [self-hosted, appendix-reviewer]
permissions:
pull-requests: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch PR base
shell: pwsh
run: |
git fetch origin ${{ github.base_ref }} --depth=1
- name: Build diff
shell: pwsh
run: |
git diff --unified=3 origin/${{ github.base_ref }}...HEAD > diff.txt
Get-Content diff.txt | Measure-Object -Line -Word -Character | Format-List
- name: Debug Python resolution
shell: pwsh
run: |
echo "PATH=$env:PATH"
where.exe python || echo "where.exe can't find python"
Get-Command python -All || echo "Get-Command can't find python"
Test-Path "C:\Users\zxc\AppData\Local\Programs\Python\Python314\python.exe"
Get-ChildItem "C:\Users\zxc\AppData\Local\Programs\Python\Python314\" -Filter python*.exe -ErrorAction SilentlyContinue
- name: Run multi-agent local review
shell: pwsh
env:
MODEL: qwen2.5.:14b-instruct
run: |
python .github/scripts/multi_agent_review.py
- name: Post comment to PR
shell: pwsh
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr comment ${{ github.event.pull_request.number }} --body-file review_comment.md