> ## 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.

# Update GitHub pull request

> Update GitHub pull request metadata, state, or target branch.

`updateGitHubPullRequest` changes a pull request's title, body, target branch, state, or maintainer permissions.

```ts automations/update-github-pull-request.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { updateGitHubPullRequest } from "automate.ax/github"

export default automation("Update GitHub pull request", () => {
  onHttpRequest({ scope: "automation" })
  updateGitHubPullRequest({
    owner: "SentsCo",
    repository: "automate.ax",
    pullRequestNumber: 173,
    title: "Add GitHub App integration",
  })
})
```

`owner`, `repository`, and positive integer `pullRequestNumber` are required. Optional replacements are `base`, `body`, `maintainerCanModify`, `state` (`"open"` or `"closed"`), `title`, and `account`. Inputs accept compatible signals.

Returns the complete updated pull request. Changing `base` can change the diff and mergeability; GitHub validates branch access and state transitions.
