# Quickstart: PR bot

Install the Repowise PR bot on a GitHub repository and see its first review on a pull request.

The Repowise PR bot is a GitHub App that reviews each pull request against the
whole repository: a `Repowise review` check on every push, one short comment,
and threads on the lines that need them. The free checks run on public
repositories.

Let your coding agent set it up. It hands you the install link and asks before
anything that costs money:

```text
Set up the Repowise PR bot on this repository. Follow https://docs.repowise.dev/hosted/bot-setup.md step by step. Tell me the exact link to click when a step needs me (installing the GitHub App, or a plan for a private repo), and ask me before anything that costs money. Finish by checking that the Repowise review check ran on a pull request.
```

## By hand

1. **Install the app.** Open
   [github.com/apps/repowise-bot](https://github.com/apps/repowise-bot/installations/new),
   pick the account or organization, select the repository (or all
   repositories), and click **Install**. If you already index with Repowise,
   this is a second app: `repowise-bot` reviews pull requests, `repowise-app`
   only reads code to index it.

   On an organization you do not own, GitHub sends the install to an
   organization owner to approve. An organization admin then confirms it on
   [repowise.dev/settings/bot](https://repowise.dev/settings/bot).

2. **Open a pull request.** The bot indexes the default branch after the
   install, which takes 3 to 10 minutes. It also reviews the most recently updated
   open pull request on up to three of the new repositories, so you may see a
   review without opening one.

3. **Read the review.** Every push gets a GitHub check run named
   `Repowise review`. A clean push concludes `success` with a title such as
   `Nothing to act on · free checks`; a push with points concludes `neutral`,
   for example `3 points to look at · deep review`. When there is something to
   act on, the bot posts one comment and edits it on later pushes. Its
   **View on Repowise** button opens the full analysis.

   From a terminal:

   ```bash
   gh pr checks <N> --watch
   ```

Private repositories need a paid plan: without one, the bot posts a short
notice with a link to start a plan, and the check reads
`Not reviewed: private repositories need a paid plan`. AI review also comes
with a paid plan. See [private repositories and plan limits](https://docs.repowise.dev/hosted/private-repos).

## No comment appeared

The `Repowise review` check is the first place to look: its title says why a
pull request was not reviewed. These are every reason the bot posts nothing,
or nothing new:

| Cause | What you see | Fix |
|---|---|---|
| The app is not installed on this repository | No `Repowise review` check at all | Install it, selecting this repository |
| The repository is not indexed yet | A comment "Repowise has not indexed this repository yet" | Wait. The first pull request starts the index, and the comment is edited into the review when it finishes |
| A private repository without a paid plan | A notice comment, and `Not reviewed: private repositories need a paid plan` | Start a plan, or keep the bot on public repositories |
| The bot is turned off for the repository | `Not reviewed: Repowise is turned off for this repository`, or `turned off in .repowise/bot.yaml` | Turn it on in [PR bot settings](https://repowise.dev/settings/bot), or set `enabled: true` |
| A bot account opened the pull request (Dependabot, Renovate and the like) | `Not reviewed: opened by a bot` | Comment `/repowise recheck` to review it anyway |
| The title opts out (`[skip repowise]`, `DNM`, `do not merge`) | `Not reviewed: the title opts out` | Remove the marker from the title, then comment `/repowise recheck` |
| This head commit was already reviewed | The existing comment stays as it is | Push a new commit, or comment `/repowise recheck` |
| Nothing to act on, with the free checks | The check concludes `success` with `Nothing to act on · free checks`, and no comment | Nothing: the review ran. Set `comment_mode: always` to get a comment every time |

To run the review again on the current commit, comment on the pull request:

```text
/repowise recheck
```

## Next
- [PR bot](https://docs.repowise.dev/hosted/bot) explains what each part of the review means.
- [Bot configuration](https://docs.repowise.dev/hosted/bot-config) covers `.repowise/bot.yaml`, AI review, limits and commands.
- [Quickstart: Repowise Hosted](https://docs.repowise.dev/getting-started/quickstart-hosted) connects your coding agent to the same index.
