feat: add AI code review workflow (Phase 8.1)
Some checks failed
0/0 projects applied successfully.
AI Review / AI Code Review (pull_request) Successful in 1s
PR Checks / OpenTofu Validate & Policy (pull_request) Failing after 7s
Security Scan / Security Scan (pull_request) Successful in 9s

This commit is contained in:
root 2026-02-14 18:36:08 +01:00
parent 75f31315be
commit 664ca36641

View 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"