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

# Pull Request Reviews

Ridgeline reviews pull requests and posts its findings directly in GitHub as review comments. You can trigger a review by leaving a comment on a pull request or enable automatic reviews for new pull requests, see [Repository Config](https://docs.ridges.ai/ridgeline/repo-config.md).

> [!NOTE]
>
> A review costs **0.1 credit**, a tenth of what a [dispatched
> job](https://docs.ridges.ai/ridgeline/dispatch-a-job.md) costs, and both spend the same [credit
> balance](https://docs.ridges.ai/ridgeline/credits.md). There is also a monthly limit on reviews,
> counted separately from your monthly limit on jobs.

## Request a review

To request a review, add a comment to an open pull request with the command on its own line:

```sh theme={null}
@ridgeline-ai review
```

Ridgeline posts a confirmation comment on the pull request and updates it as the review progresses. Once complete, the comment summarizes the findings and reports the number of issues found.

> [!NOTE]
>
> Commands are matched against a whole line, ignoring case and extra spacing, so
> `@Ridgeline-AI review` works but `please @ridgeline-ai review this` does not.
> `@ridgeline-ai` is only the wording of the command — it is not a GitHub
> account, so there is nothing to notify and nobody to invite to your
> repository.

Anyone can trigger a review by leaving a comment, but it only runs when the commenter has a Ridgeline account and write access to that repository. The review uses the commenter's credits, with no fallback payer. This prevents comments on public pull requests from using the maintainer's credits.

Asking again after pushing reviews only the commits added since the last review, and says so: *Reviewed the changes since the last review*.

## Findings

Ridgeline posts its findings on the pull request itself, as a GitHub review. Each finding is a comment on the line or block of code it concerns, with an explanation and a suggested change where the fix is clear. Findings that don't map to the diff are listed separately in the review body.

Each finding has a severity and a category. Severity can be `critical`, `high`, `medium`, or `low`, with findings ordered from most to least severe.

> [!NOTE]
>
> Each review includes at most **eight** findings, prioritizing the most severe.
> This keeps the focus on the issues that matter most, rather than overwhelming
> the review with every issue found.

After a review, the review body includes two commands for the next steps: `@ridgeline-ai review` to review any new commits pushed since the last review, and `@ridgeline-ai fix` to have Ridgeline address the findings.

## Fix the findings

To fix findings on a review, add a comment with the command on its own line after an initial review:

```sh theme={null}
@ridgeline-ai fix
```

On a pull request, this fixes the findings of its most recent review. Any other text you include in the comment is passed to the agent as extra instructions and context.

> [!NOTE]
>
> A fix costs **1 credit**, like any dispatched job.

The `@ridgeline-ai fix` command also works outside pull request reviews. When used on a GitHub issue, it starts or re-runs that issue's job. Similarly, when used in a review you submit on a pull request opened by Ridgeline, it re-runs the job that created the pull request. See [**Dispatch a Job**](https://docs.ridges.ai/ridgeline/dispatch-a-job.md#start-and-re-run-from-github).

## Troubleshooting reviews

When Ridgeline will not run a review, it replies on the pull request saying why.

| Reply | What it means |
| - | - |
| “there's nothing new to review” | No commits have been pushed since the last review. Nothing is charged — push a change and ask again. |
| “a run is already queued or in progress here” | A review of this pull request has not posted its findings yet. Nothing is charged, so wait for it rather than asking again. |
| “there's no Ridges account linked to…” | The commenting account is not connected to Ridgeline. Sign up, connect your GitHub account, and the command works from then on. |
| “isn't a collaborator with write access” | Runs are billed to whoever triggers them, so they are limited to collaborators who can write to the repository. Ask a maintainer for write access. |
| “can't fund a run” | Either you are out of credits or you have reached a monthly limit. Check your dashboard for details. |
| “the issue is closed” | The pull request is closed, so there is nothing to review. Reopen it and ask again. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.