# Check PR

Evaluates a pull request against committed Rho repo policy.

```yaml
on:
  pull_request_target:
    types: [opened, reopened, synchronize]

permissions:
  contents: read
  pull-requests: write

jobs:
  rho:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.base.sha }}
      - uses: ./action/setup-rho
      - uses: ./action/check-pr
        with:
          pr-number: ${{ github.event.pull_request.number }}
          auto-close: "true"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

The action may use `pull_request_target` because it only checks metadata and
base-branch policy. Do not run untrusted PR code in this workflow.

For fixture tests, pass `event-path` with synthetic GitHub event JSON and set
`fail-on-pending` or `fail-on-blocked` to `"false"` when asserting those outputs.
