Files
FastSync/.gitea/workflows/agent-review.yml
T
TapTap 3d2eb97205
CI / lint (push) Successful in 1m4s
CI / sanitizers (address) (push) Successful in 36s
CI / sanitizers (undefined) (push) Successful in 36s
CI / fuzz-build (push) Successful in 14s
CI / coverage (push) Successful in 31s
CI / build-and-test (push) Successful in 1m15s
CI / valgrind (push) Successful in 32s
ci: add automated agent workflows — review, fix, maintenance, batch-merge
2026-07-30 18:24:29 +02:00

45 lines
1.5 KiB
YAML

name: Agent PR Review
on:
pull_request:
types: [opened, synchronize, ready_for_review]
jobs:
review:
runs-on: ubuntu-latest
container: gitea.tap-tap.win/taptap/fastsync-ci:v9
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install opencode
run: npm install -g opencode-ai
- name: Run security audit review
run: |
opencode run --agent security-auditor \
"Review this PR for security vulnerabilities" \
> /tmp/security-review.md 2>&1 || true
- name: Run code quality review
run: |
opencode run --agent code-quality-guardian \
"Review this PR for code quality issues" \
> /tmp/quality-review.md 2>&1 || true
- name: Post combined review
run: |
{
echo "## Agent Review Report"
echo ""
echo "### Security Audit"
cat /tmp/security-review.md 2>/dev/null || echo "No security issues found."
echo ""
echo "### Code Quality"
cat /tmp/quality-review.md 2>/dev/null || echo "No quality issues found."
} > /tmp/full-review.md
curl -s -X POST -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
-H "Content-Type: application/json" \
-d "$(jq -Rs '{body: .}' < /tmp/full-review.md)" \
"https://gitea.tap-tap.win/api/v1/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"