Skip to content

Commit e4d09ed

Browse files
committed
review action added
1 parent 1af4c92 commit e4d09ed

2 files changed

Lines changed: 43 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/review.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: auto code review
2+
3+
on:
4+
pull_request: :
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
review:
9+
runs-on: [self-hosted, appendix-reviewer]
10+
permissions:
11+
pull-requests: write
12+
contents: read
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Fetch PR base
21+
shell: pwsh
22+
run: |
23+
git fetch origin ${{ github.base_ref }} --depth=1
24+
25+
- name: Build diff
26+
shell: pwsh
27+
run: |
28+
git diff --unified=3 origin/${{ github.base_ref }}...HEAD > diff.txt
29+
Get-Content diff.txt | Measure-Object -Line -Word -Character | Format-List
30+
31+
- name: Run multi-agent local review
32+
shell: pwsh
33+
env:
34+
MODEL: qwen2.5.:14b-instruct
35+
run: |
36+
python .github/scripts/multi_agent_review.py
37+
38+
- name: Post comment to PR
39+
shell: pwsh
40+
env:
41+
GH_TOKEN: ${{ github.token }}
42+
run: |
43+
gh pr comment ${{ github.event.pull_request.number }} --body-file review_comment.md

0 commit comments

Comments
 (0)