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"