# Connect GitHub (/github-app)



A squash or a rebase merge writes new commits, so the commit a decision was recorded in never reaches `main`. Without
help, everyone on `main` would lose it. The Jinion Cloud GitHub App sees each pull request merge and gives its decisions
the merge commit too, so they reach `main` whichever way you merge.

## What it can see [#what-it-can-see]

It asks for two permissions, both read-only:

| Permission    | Why                                                           |
| ------------- | ------------------------------------------------------------- |
| Metadata      | GitHub requires it of every app: the repositories' names      |
| Pull requests | To see a pull request open, change and merge, and its commits |

It never reads your code, your files or your issues.

## Connect it [#connect-it]

1. On [cloud.jinion.co](https://cloud.jinion.co), open the project and press **Connect GitHub**. You need to be an admin
   of the workspace.
2. On GitHub, pick the account or organization, and the repositories it may see.
3. GitHub sends you back to the project, which shows **Connected**.

In an organization you don't own, GitHub asks its owner to approve. The project shows **Waiting for your organization's
owner**, and connects by itself once they do.

## Once it is connected [#once-it-is-connected]

* Decisions on a pull request show as in review, and as merged once it is.
* A decision whose pull request was closed without merging stops applying for everyone but its author.
* Decisions recorded before you connected are carried through the pull requests merged in the last 90 days.

The workspace's **Settings** list the GitHub accounts connected, each with a link to change the repositories it sees on
GitHub. **Disconnect GitHub** on a project's page stops following its pull requests.

## Without it [#without-it]

Everything else works. A merge commit still carries decisions to `main`; only squash and rebase merges need the App.
