---
title: "Refresh GitHub repository visibility"
method: POST
path: "/github/refresh"
---

# Refresh GitHub repository visibility

`POST /github/refresh`

## Request

- Base URL: `https://api.eurobase.dev`
- URL: `https://api.eurobase.dev/github/refresh`
- Auth: none declared

Explicit rate-limited provider refresh. The API claims a per-user refresh lease, performs bounded provider reads, and commits only if the DB snapshot version has not changed while the provider read was in flight.

## Response `200`

Refreshed GitHub snapshot

- GitHubReposResponse
  - `githubAccount` GitHubAccount, nullable, required
    - `login` string, required
    - `name` string, nullable
    - `avatarUrl` string, nullable
    - `oauthStatus` 'connected' | 'revoked' | 'unknown' | 'null', nullable
    - `oauthStatusReason` string, nullable
    - `oauthVerifiedAt` string, date-time, nullable
    - `snapshotVersion` integer
    - `createdAt` string, date-time, nullable
    - `updatedAt` string, date-time, nullable
  - `installations` GitHubInstallation[], required
    - `id` string, required
    - `accountLogin` string, nullable
    - `repoCount` integer, required: Selected or allowed repository count recorded for this installation. A missing stored count is serialized as 0 only while the top-level snapshot remains not ready with refresh recovery; it is not proven empty inventory.
    - `repositoryAccessAction` GitHubConnectAction
      - `kind` 'none' | 'oauth' | 'refresh' | 'install' | 'manage' | 'review' | 'disabled', required
      - `label` string, required
      - `href` string, nullable
      - `disabled` boolean
      - `reason` string, nullable
    - `syncStatus` 'ok' | 'empty' | 'error' | 'stale'
    - `syncError` GitHubSyncError
      - `code` string, required
      - `scope` 'installations' | 'repositories', required
      - `actor` 'user' | 'operator' | 'unknown', required
      - `recoveryAction` 'reconnect-oauth' | 'install-app' | 'open-installation-access' | 'retry-refresh' | 'operator-fix', required
      - `message` string, required
  - `repos` GitHubRepo[], required: Browser-safe repository rows after applying the bounded q and limit projection.
    - `id` string, required
    - `name` string, required
    - `fullName` string, required
    - `private` boolean, required
    - `defaultBranch` string, required
  - `accountStatus` 'none' | 'unknown' | 'connected' | 'revoked', required
  - `accountStatusReason` string, nullable
  - `accountVerifiedAt` string, date-time, nullable
  - `sync` GitHubSyncState, required
    - `status` 'ok' | 'partial' | 'stale', required
    - `message` string, nullable
    - `errors` GitHubSyncError[], required
      - `code` string, required
      - `scope` 'installations' | 'repositories', required
      - `actor` 'user' | 'operator' | 'unknown', required
      - `recoveryAction` 'reconnect-oauth' | 'install-app' | 'open-installation-access' | 'retry-refresh' | 'operator-fix', required
      - `message` string, required
    - `primaryError` GitHubSyncError
      - `code` string, required
      - `scope` 'installations' | 'repositories', required
      - `actor` 'user' | 'operator' | 'unknown', required
      - `recoveryAction` 'reconnect-oauth' | 'install-app' | 'open-installation-access' | 'retry-refresh' | 'operator-fix', required
      - `message` string, required
  - `installationCount` integer, required
  - `repoCount` integer, required: Sum of installation repository counts before q and limit are applied; it can exceed the returned or persisted repository rows when the snapshot is bounded or truncated. A missing stored installation count is normalized to 0 while ready remains false and recoveryAction remains refresh.
  - `snapshotVersion` integer, required
  - `snapshotUpdatedAt` string, date-time, nullable
  - `hasSavedAccess` boolean, required
  - `projectCreateAvailable` boolean, required
  - `recommendedAction` 'none' | 'oauth' | 'refresh' | 'install' | 'manage' | 'review' | 'disabled', required
  - `recoveryAction` GitHubConnectAction, required
    - `kind` 'none' | 'oauth' | 'refresh' | 'install' | 'manage' | 'review' | 'disabled', required
    - `label` string, required
    - `href` string, nullable
    - `disabled` boolean
    - `reason` string, nullable
  - `repositoryAccessAction` GitHubConnectAction
    - `kind` 'none' | 'oauth' | 'refresh' | 'install' | 'manage' | 'review' | 'disabled', required
    - `label` string, required
    - `href` string, nullable
    - `disabled` boolean
    - `reason` string, nullable
  - `navStatus` object, required
    - `tone` 'neutral' | 'healthy' | 'warning' | 'danger', required
    - `label` string, required
  - `ready` boolean, required

## Other responses

- `409`: GitHub refresh already in progress

---

[API](https://skmtc.dev/eurobase/apis/eurobase-api.md) · [All operations](https://skmtc.dev/eurobase/apis/eurobase-api/llms.txt) · [OpenAPI document](https://skmtc.dev/eurobase/apis/eurobase-api/revisions/5266a299d18a?raw)
