# Code Review in the Factory App

Review and merge GitHub pull requests and GitLab merge requests in the Factory App, with Droid in chat beside every review.

Code Review is a page in the Factory App for reviewing GitHub pull requests and GitLab merge requests, with a Droid chat over every review. Open it from **Code Review** in the sidebar (under **More** if you haven't customized the sidebar), or press <Kbd keys='Cmd+K' /> or <Kbd keys='Ctrl+K' />, paste a pull request link, and choose **Open in Code Review**.

<Note>
  To have Droid post review comments on every pull request automatically, set up [Automated Code Review](/automations/code-review-ci).
</Note>

## Set up

Your organization must have Code Review turned on. If it is off, ask a Factory admin. Code Review then reads pull requests with your own code host account:

- **GitHub:** connect your account and install the Factory app on the account or organization that owns the repositories. If you can't install it, select **Copy link for an admin** and send the link to someone who can.
- **GitLab:** a Factory admin connects your organization's GitLab group, then you connect your GitLab account.

If your organization turned off personal code host connections, a Factory admin can allow them in **App Permissions**.

## Search and saved views

Each inbox tab is a search that uses GitHub's pull request syntax, such as `is:open review-requested:@me -label:wip`. **Filters** lists the qualifiers you can use, and GitLab supports a subset of them. Select **Save view** to keep a search as its own tab. You can keep up to 20 saved views, and they sync across your devices.

## Walkthroughs and QA

- **Walkthrough** (GitHub only): select **Set up walkthroughs** to add the [Code Walkthrough automation](/automations/code-walkthroughs), which writes a walkthrough for every pull request, or **Try it out** to have Droid write one for this pull request in the chat. In the web app, **Try it out** needs a Droid Computer.
- **Validation**: shows the report and recording from [Automated QA](/automations/automated-qa). Select **Set up QA** to add it to the repository.

## Have Droid fix a pull request

- **Fix**, in a pull request's merge status, has Droid resolve merge conflicts, failing checks, and review comments, then push the fixes. It needs the `fix-pull-request` [skill](/harness/skills) turned on.
- **Auto-fix**, in a row's menu, is for pull requests a Droid session opened. When it is on, Droid keeps addressing review comments, fixing failing CI checks, and rebasing by sending follow-up messages to that session.

## Pull request links

Pull request links in a session open for review beside it, and review links you open in a browser switch to Factory Desktop. To change either, see [App settings](/factory-app/settings#pull-request-links).

<RelatedLinks>
  <RelatedLink href='/automations/code-review-ci' title='Automated Code Review'>
    Have Droid review every pull request in CI.
  </RelatedLink>
  <RelatedLink href='/automations/automated-qa' title='Automated QA'>
    Produce the QA reports shown in Validation.
  </RelatedLink>
  <RelatedLink href='/workstreams/pull-requests' title='Workstream pull requests'>
    Review the pull requests a workstream opens.
  </RelatedLink>
  <RelatedLink href='/factory-app/settings' title='App settings'>
    Preferences for where pull request links open.
  </RelatedLink>
</RelatedLinks>
