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

> Update issue or pull request fields through GitHub's Issues API.

`updateGitHubIssue` updates fields shared by GitHub issues and pull requests.

```ts automations/close-github-issue.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { updateGitHubIssue } from "automate.ax/github"

export default automation("Close GitHub issue", () => {
  onHttpRequest({ scope: "automation" })
  updateGitHubIssue({
    owner: "SentsCo",
    repository: "automate.ax",
    issueNumber: 179,
    state: "closed",
    stateReason: "completed",
  })
})
```

`owner`, `repository`, and positive integer `issueNumber` are required. Optional replacements are `title`, `body` (`null` clears it), `assignee` (`null` clears it), `assignees`, `labels`, `milestone` (`null` clears it), `state`, and `stateReason` (`"completed"`, `"not_planned"`, `"reopened"`, or `null`). Optional `account` defaults to the project binding. Inputs accept compatible signals.

Returns the updated GitHub issue or pull request. GitHub validates repository-specific users, labels, milestones, and state transitions.
