test: verify pr-review workflow #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Review | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| review: | |
| name: Relay PR Review | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install pi-relay | |
| id: relay | |
| run: | | |
| npm install -g github:benaiad/pi-relay | |
| echo "plan_dir=$(npm root -g)/pi-relay/bundled/ci" >> "$GITHUB_OUTPUT" | |
| - name: Run PR review | |
| run: | | |
| relay bundled/ci/pr-review.md \ | |
| -e pr_number="${{ github.event.pull_request.number }}" \ | |
| --model "$RELAY_MODEL" \ | |
| --thinking "${RELAY_THINKING:-off}" | |
| env: | |
| RELAY_MODEL: ${{ secrets.RELAY_MODEL }} | |
| RELAY_THINKING: ${{ secrets.RELAY_THINKING }} | |
| RELAY_PLAN_DIR: ${{ steps.relay.outputs.plan_dir }} | |
| GH_TOKEN: ${{ github.token }} | |
| # Add your provider's API key secret below. Name depends on provider: | |
| # zai → ZAI_API_KEY, anthropic → ANTHROPIC_API_KEY, openai → OPENAI_API_KEY | |
| ZAI_API_KEY: ${{ secrets.ZAI_API_KEY }} |