# GitHub Integration

Source: https://athas.dev/docs/github-integration

Connect GitHub for dashboard inbox sync and desktop repository views.

Athas can connect your GitHub account so repository activity appears in the web dashboard and in
the desktop GitHub sidebar.

## What It Enables

- **Dashboard inbox**: Sync GitHub Issues, Pull Requests, Discussions, Actions, Releases, and
  Notifications into your Athas inbox
- **GitHub views in desktop**: Show pull requests, issues, and workflow activity for the current
  repository
- **Connected account status**: Display the linked GitHub account and granted OAuth scopes in
  Dashboard > Integrations

## Permissions

Athas requests `repo read:user` when you connect GitHub from Dashboard > Integrations.

The `read:user` permission is used to identify the connected GitHub account. The `repo` permission
allows Athas to read repository activity, including private repositories you can access.

## Token Storage

When GitHub returns an OAuth access token, Athas encrypts it before storing it on the Athas server.
The web dashboard uses that token server-side when it syncs GitHub activity into your inbox.

The desktop app does not use your web browser cookie to call GitHub. It signs in to Athas with a
desktop session token, fetches your connected GitHub token from Athas, and stores it locally in the
OS keychain when available. GitHub API calls from the desktop app then use that GitHub token
directly.

Athas records an activity log entry when the desktop app syncs the GitHub token, but the token
itself is never written to the activity log.

## Synced Data

The dashboard sync stores inbox items derived from GitHub data, including titles, bodies, authors,
labels, URLs, repository names, issue or pull request numbers, workflow status, release metadata,
and notification reasons.

## Disconnecting

Use Dashboard > Integrations > GitHub > Disconnect to remove the stored GitHub integration from
Athas. You can also revoke the OAuth grant from GitHub's application settings.

After disconnecting, the dashboard can no longer sync new GitHub activity. The desktop app will
remove its local GitHub token the next time it checks the connected account and sees that GitHub is
not connected.

## GitHub access versus Git transport

The connected GitHub account supplies API features. It does not automatically configure every SSH key or Git credential helper used for clone, fetch and push. If a Git operation fails, check its own transport credentials as well as the [connected dashboard account](https://athas.dev/docs/dashboard-integrations).
