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

# Connecting GitHub & GitLab

> Link a GitHub installation or a GitLab group to your slipway org.

Each slipway organization is anchored to exactly one upstream account — a GitHub App installation **or** a GitLab group. Installing on the same account again signs you back into the same org; a different account creates a different org. Use the sidebar's **Add an organization** to connect another.

## GitHub

Installing the slipway GitHub App on a user or org creates your slipway org. The app asks for:

* **Repository contents** (read) — to fetch `slipway.yaml` and clone for builds.
* **Pull requests** (read & write) — to read PR metadata and post preview-status comments.
* **Checks** (write) — to surface spec validation on PR commits.
* **Webhooks** — push, pull request, and installation events.

Repos you don't grant during install are invisible to slipway.

**Adding repos.** In GitHub, open the installation settings (account/org → **Applications → slipway → Configure**) and grant more repos — slipway syncs the list automatically. To force it, use **Settings → Integrations → Sync repos**. Uninstalling and reinstalling later keeps your org and its deployment history.

## GitLab

<Note>
  Only **gitlab.com** is supported.
</Note>

Connect a group from the login page or **Add an organization** → **Continue with GitLab**. You need **Maintainer or higher** on the group. Slipway lists the groups you can use; pick one, and it mints a group access token, registers a webhook, creates the slipway org, and ingests every project under the group (subgroups included, archived projects excluded). You land on the repos list, ready to enable.

GitLab repos behave like GitHub repos once enabled — a push to the default branch deploys, and a Merge Request is treated like a PR (opened spins up a preview, new commits redeploy it, closing tears it down). Slipway posts commit statuses and a preview-URL comment on the MR.

## What triggers what

| Event                      | What slipway does                                           |
| -------------------------- | ----------------------------------------------------------- |
| Push to the default branch | Enqueues a deployment for the new commit.                   |
| PR / MR opened or updated  | Builds a preview and posts (or updates) the status comment. |
| PR / MR closed             | Tears down every deployment for it and updates the comment. |

Every incoming webhook is signature-verified before slipway acts on it.
