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

# Automate with the GitHub App

> Zero API calls. Every PR auto-generates its pull story.

## The simplest integration

If you don't want to write any code — install the pull/story GitHub App on your repo and you're done. Every PR gets a pull story automatically within \~60 seconds of being opened, with the link posted to the PR description.

This cookbook covers the manual knobs: when auto-gen runs, when it doesn't, and how to combine it with the REST API.

## Install

[github.com/apps/pull-story/installations/new](https://github.com/apps/pull-story/installations/new)

Pick specific repos or **All repositories**. You can change this later from your GitHub settings.

## Default behavior

| Event                        | Auto-generates?                     |
| ---------------------------- | ----------------------------------- |
| PR opened (ready for review) | ✅ yes                               |
| PR opened as draft           | ❌ skipped (toggle in dashboard)     |
| Draft marked ready           | ✅ yes                               |
| New commit pushed to PR      | ✅ yes (regenerates on new head SHA) |
| PR closed or merged          | no change                           |

## Toggle per repo

[pullstory.com/dashboard](https://pullstory.com/dashboard) → **Automations** → per-repo switches:

* **Auto-generate on PR open**
* **Auto-generate on new commits**
* **Skip drafts**
* **Post link in PR description**

## Combine with Claude Code

The GitHub App and Claude Code MCP share the same minute quota. So:

* A PR auto-generated by the App is already at `pullstory.com/pr/{owner}/{repo}/{number}`
* For custom explanations outside a PR, use the MCP `create_pull_story` tool with a structured brief
* To regenerate a PR story, use the dashboard controls or push a new commit

The public REST API currently creates brief-based stories; it does not expose PR lookup or forced regeneration endpoints.

## Next

<CardGroup cols={2}>
  <Card title="Claude Code" icon="terminal" href="/integrations/claude-code">
    Skip the "open PR, wait for App" loop entirely.
  </Card>

  <Card title="Embed stories" icon="code" href="/cookbooks/embed-a-pull-story">
    Drop auto-generated pull stories into docs, changelogs, blog posts.
  </Card>
</CardGroup>
