feat: add AI code review workflow (Phase 8.1)
This commit is contained in:
parent
75f31315be
commit
664ca36641
22
.gitea/workflows/ai-review.yaml
Normal file
22
.gitea/workflows/ai-review.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
name: AI Review
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
ai-review:
|
||||
name: AI Code Review
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Trigger AI Review
|
||||
run: |
|
||||
# Get Docker host gateway IP from routing table
|
||||
HOST_IP=$(cat /proc/net/route | awk "/^eth0.*00000000/ {print \$3}" | head -1 | sed "s/\(..\)\(..\)\(..\)\(..\)/0x\4 0x\3 0x\2 0x\1/" | xargs printf "%d.%d.%d.%d\n")
|
||||
echo "Host IP: ${HOST_IP}"
|
||||
curl -sf -X POST "http://${HOST_IP}:8090/review" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"repo\": \"${{ gitea.repository }}\", \"pr_number\": ${{ gitea.event.number }}}" \
|
||||
--max-time 10 || echo "AI review service unavailable, skipping"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user