> ## 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 review comment

> Create an inline review comment on a GitHub pull request diff.

`github.createPullRequestReviewComment` creates a standalone inline comment on a pull request diff.

```ts automations/comment-on-github-diff.automation.ts theme={null}
import { automation } from "automate.ax"
import { github } from "automate.ax/github"

export default automation("Comment on GitHub diff", () => {
  github.createPullRequestReviewComment({
    body: "Please handle the empty response here.",
    commitId: "pull-request-head-sha",
    line: 48,
    owner: "SentsCo",
    path: "src/api.ts",
    pullRequestNumber: 42,
    repository: "automate.ax",
    side: "RIGHT",
  })
})
```

Provide the repository, `pullRequestNumber`, Markdown `body`, reviewed `commitId`, and file `path`. For an inline comment, omit `subjectType` or set it to `"line"`, then provide `line` and `side`. For a multi-line comment, also provide `startLine` and `startSide` together. For a whole-file comment, set `subjectType: "file"` and omit all line fields. Diff coordinates must exist in the selected commit. Returns the comment's `id`, `body`, and file `path`. Requires Pull requests write permission.
