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

# GitHub & GitLab sync

> Keep an external tracker in lockstep: issues sync in as work items, and outside contributors' PRs become review-work that closes itself when the PR does.

One webhook per repo, two independent streams. An owner or admin sets it up from
**Connectors → Sync**; everyone benefits.

<div className="rt-logos">
  <div className="rt-logo">
    <svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
      <path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z" />
    </svg>

    <span>GitHub</span>
  </div>

  <div className="rt-logo">
    <svg width="18" height="18" viewBox="0 0 24 24" fill="#FC6D26" aria-hidden="true">
      <path d="M23.955 13.587l-1.342-4.135-2.664-8.189c-.135-.423-.73-.423-.867 0L16.418 9.45H7.582L4.919 1.263C4.783.84 4.19.84 4.052 1.263L1.386 9.45.044 13.587a.924.924 0 0 0 .331 1.023L12 23.054l11.625-8.443a.92.92 0 0 0 .33-1.024" />
    </svg>

    <span>GitLab</span>
  </div>
</div>

| Stream           | Default | What happens                                                                                                                                            |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Sync issues**  | on      | Repo issues land in a Retasc project, labeled (default `support`). With a token, Retasc closes them back on `done` or `canceled`.                       |
| **Sync PRs/MRs** | off     | Outside contributors' PRs become review items on a preset reviewer's lane. Merge promotes to `done`; close without merge cancels. Automatic, both ways. |

<Note>
  **Your own team's PRs are filtered out.** A PR on a tracked branch, referencing an
  issue id, or authored by a linked member is already tracked work. Only genuinely
  external PRs become items.
</Note>

## Set up

<Steps>
  <Step title="Connect a repo">
    **Connectors → Sync → GitHub or GitLab → Connect a repo**, and pick the Retasc
    project to sync into.
  </Step>

  <Step title="Name the repo">
    Type `owner/name`, or paste a token and use "Pick from my repos" for a verified
    dropdown. GitLab: add an Instance URL if self-hosted.
  </Step>

  <Step title="Choose streams">
    Turning PRs on requires naming a reviewer: an active human member whose lane the
    reviews dispatch to.
  </Step>

  <Step title="Paste the webhook">
    Retasc shows a Payload URL and secret **once**. Paste both into the repo's
    Settings → Webhooks (a deep link opens the right page), ticking the events that
    match your toggles.
  </Step>

  <Step title="Verify">
    GitHub pings automatically and the card flips to Connected. GitLab does not: click
    **Test** in GitLab or touch a real issue or MR, or the card stays Pending forever.
  </Step>
</Steps>

<div className="rt-mock">
  <div className="rt-mock-bar">
    <span className="rt-mock-dot" />

    <span className="rt-mock-dot" />

    <span className="rt-mock-dot" />

    <span className="rt-mock-url">dash.retasc.com/connectors</span>
  </div>

  <div className="rt-mock-body">
    <div className="rt-mock-card">
      <div className="rt-mock-eyebrow">Connect a repo</div>
      <div className="rt-mock-field"><label>Repository</label><div className="rt-mock-input">acme/backend</div></div>
      <div className="rt-mock-togrow"><span>Sync issues → label <code>support</code></span><span className="rt-mock-toggle" /></div>
      <div className="rt-mock-togrow"><span>Sync PRs → reviewer <b>Dana</b> (required)</span><span className="rt-mock-toggle" /></div>
      <span className="rt-mock-btn">Connect</span>
    </div>

    <div className="rt-mock-card">
      <div className="rt-mock-eyebrow">Finish in GitHub <span className="rt-mock-badge pend">Pending</span></div>
      <div className="rt-mock-field"><label>Payload URL</label><div className="rt-mock-input">https\://…convex.site/webhooks/github/int\_8h2k…</div></div>
      <div className="rt-mock-field"><label>Secret, shown once</label><div className="rt-mock-secret">whsec\_9f3a51c8e2…<span className="rt-mock-copywarn">copy now</span></div></div>
    </div>
  </div>
</div>

<Warning>
  **The secret is shown exactly once.** Lose it and you Disconnect and reconnect for a
  fresh one; there is no re-reveal.
</Warning>

## Manage

The **Connections** tab lists every connector with its status, project, and streams.
Owners edit sync settings, tokens, or Disconnect (syncing stops immediately). Agents
can read `list_connectors` and call `revoke_connector` over MCP, metadata only:
connecting a new repo is Dash-only, so a raw token never transits MCP.

## Next steps

<CardGroup cols={2}>
  <Card title="Review workflow" icon="user-check" href="/review">
    What happens to a synced PR once it lands in review.
  </Card>

  <Card title="Notifications" icon="bell" href="/notifications">
    A DM the moment a synced item lands on your lane.
  </Card>
</CardGroup>
