---
title: "GitHub: pull requests and code in sfora"
description: "Connect sfora's GitHub App, see a project's pull requests under Resources on its Overview, review and merge them in sfora, and browse the code."
canonical: "https://www.sfora.ai/docs/work/github"
---
# GitHub: pull requests and code in sfora

> Connect sfora's GitHub App, see a project's pull requests under Resources on its Overview, review and merge them in sfora, and browse the code.

Source: https://www.sfora.ai/docs/work/github

**GitHub** connects to sfora through the sfora GitHub App. Once a project has a repository attached, its pull requests and its code show under **Resources** on the project's **Overview**, and you can review and merge pull requests without leaving sfora.

Figure: The Harbor app project's open pull requests, from its attached GitHub repo.
- **+ Attach repo** adds another repository to the project.
- Each pull request's checks: running, passing or failing.

## Connect GitHub

A workspace owner or admin connects GitHub once for the whole workspace.

1. Open **Settings** (`7`), and under **Manage**, pick **Integrations**.
2. On the **GitHub** card, click **Connect**. GitHub opens.
3. Install the sfora GitHub App on your account or organization, and choose the repositories it can see.
4. GitHub sends you back to sfora, which links the installation to your workspace. If you belong to more than one workspace, pick one under **Connect GitHub to…**.

The **GitHub** card then says **Connected** and which GitHub account it's installed on. **Manage** opens the installation on GitHub, where you can change which repositories sfora can see. Under the card, **Connected repositories** lists every repository attached to a project, with a link to the project.

## Attach another repository

**Resources**, on the project's **Overview**, lists the attached repositories at the top of its pull requests. To add one:

1. Click **+ Attach repo**.
2. In **Attach a repository**, search for the repository. The list shows the ones the sfora GitHub App can see; private ones have a lock.
3. Click **Attach** beside it.

A project can have several repositories, and a repository can be attached to more than one project.

## See a project's pull requests

Open the project's **Overview** (`g o`) and find **Resources**. It lists the open pull requests of every attached repository, the most recently updated first. Each row shows:

- its state: **Open** or **Draft**;
- its title, then the repository and number, the author, and when it last changed;
- the lines added and removed;
- its checks: **Checks running**, **Checks pass** or **Checks fail**.

Click a pull request to open it.

## Review a pull request

The pull request's page shows its state, title, author and branches, the cards and posts that reference it under **Referenced in**, and the diff.

1. To comment on a line, point at it in the diff and click **＋**. Type in **Leave a comment on this line…** and click **Add comment**. The comment waits, marked **Pending review**, until you send your review.
2. Send your review with one of the buttons at the top:
   - **Approve**;
   - **Request changes**;
   - **Comment**, which opens **Leave a review summary…**; click **Submit comment** to send it.
   Your line comments go with it.
3. To merge, click **Merge (squash)**. sfora squashes the pull request's commits into one.

The buttons show only while the pull request is open. **GitHub** at the top right opens it on GitHub, and **Pull requests** at the top left takes you back to the list.

Reviews and merges are sent by the sfora GitHub App, not by your own GitHub account.

## Browse the code

Under **Resources** on the project's **Overview**, open **Repositories**, then the repository. It shows the files on the repository's default branch.

Click a file to read it. A Markdown file switches between **Rendered** and **Source**. **Copy path** copies the file's path, and **Open on GitHub** opens it there.

On a phone: The pull request page works the same on a phone. Long lines in the diff scroll sideways.

## Availability

Connecting GitHub, attaching a repository, reviewing and merging take a workspace owner or admin. Any member of the project can see its pull requests and browse its code. GitHub works on every plan.

## Troubleshooting

### Approve or Merge fails

Only workspace owners and admins can review and merge from sfora. Ask one of them, or review on GitHub.

### A repository isn't in Attach a repository

The sfora GitHub App can't see it. In **Settings** › **Integrations**, click **Manage** on the **GitHub** card and give the App access to it.

### A file says Preview is too large

sfora shows files up to 1 MB. Larger files, and binary files, stay on GitHub: click **Open on GitHub**. A repository's file list holds at most 8,000 files and folders.

Related: https://www.sfora.ai/docs/work/projects, https://www.sfora.ai/docs/work/cards, https://www.sfora.ai/docs/work/workspace-map
