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

# Create GitHub pull request

> Create a pull request between two GitHub branches.

`createGitHubPullRequest` opens a pull request from a source branch into a target branch.

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

export default automation("Create GitHub pull request", () => {
  onHttpRequest({ scope: "automation" })
  createGitHubPullRequest({
    owner: "SentsCo",
    repository: "automate.ax",
    head: "feature/github-docs",
    base: "main",
    title: "Document GitHub integration",
    draft: true,
  })
})
```

`owner`, `repository`, non-empty `head`, `base`, and `title` are required. Prefix `head` with `owner:` for a fork. Optional fields are Markdown `body`, `draft`, `maintainerCanModify`, and `account`. Inputs accept compatible signals.

Returns the complete created pull request. GitHub rejects missing branches, identical source and target commits, and branch combinations the installation cannot access.
