# Review a Pull Request with Read-Only GitHub Tools (https://www.shipfox.io/docs/how-to/author-workflows/use-integration-tools)

Description: Let an agent read a pull request without changing GitHub.

Use this guide when an agent must read pull-request data from GitHub. The step
receives no write operation.

## Before you begin [#before-you-begin]

You need:

* The slug of an integration connection for GitHub. This guide uses
  `github_acme` as a placeholder.
* A GitHub integration connection that supports agent tools.
* A test branch that is ready to open as a pull request. Do not open it until
  the workflow has synced.

## Add the workflow [#add-the-workflow]

Create `.shipfox/workflows/read-pull-request.yml`. Replace `github_acme` with
the slug of your GitHub integration connection. This is a complete workflow:

```yaml
# yaml-language-server: $schema=https://www.shipfox.io/docs/workflow.schema.json
name: Read a new pull request
runner: shipfox

triggers:
  on_pull_request:
    source: github_acme # Replace with the slug of your GitHub integration connection.
    event: pull_request.opened

jobs:
  review:
    steps:
      - prompt: |
          Read pull request #${{ event.number }} and its changed files.
          Report the two highest correctness risks in the step log.
          Do not change the pull request or repository.
        integrations:
          - include: [pull_request_read]
```

The workflow omits `connection`, so Shipfox selects the project's source
integration connection. See [Agent integration
fields](https://www.shipfox.io/docs/reference/workflow-schema#agent-integration-fields) for other choices.

Commit and push the file to the project's default branch. Wait for **Read a new
pull request** to sync.

## Verify read-only access [#verify-read-only-access]

Open the test pull request and inspect the new Shipfox run.

1. Confirm that the agent calls only operations from `pull_request_read`.
2. Confirm that its report cites files from the pull request.
3. Refresh GitHub. Check that the agent added no comment, review, label, or
   commit.

Use [Post a pull-request
review](https://www.shipfox.io/docs/how-to/author-workflows/post-pull-request-review) when the task intends
a GitHub write.