> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# On GitHub pull request opened

> Start an automation when a GitHub pull request is opened.

`onGitHubPullRequestOpened` emits only pull request deliveries whose action is `"opened"`.

```ts automations/watch-opened-github-pull-requests.automation.ts theme={null}
import { automation } from "automate.ax"
import { onGitHubPullRequestOpened } from "automate.ax/github"

export default automation("Watch opened GitHub pull requests", () => {
  const event = onGitHubPullRequestOpened()
  event.transform(({ pull_request, repository }) => ({
    pullRequest: pull_request.number,
    repository: repository.full_name,
  }))
})
```

Optional static `account` defaults to the project binding. Returns `Signal<GitHubPullRequestOpenedEvent>` with `action: "opened"` and the complete typed pull request webhook payload. Draft pull requests also emit when first opened; use [On GitHub pull request ready for review](/reference/integrations/github/triggers/on-pull-request-ready-for-review) for the later transition.
