---
title: "Get Github Repository Staleness"
method: GET
path: "/api/v1/sources/github/repository-staleness"
tags: ["authed"]
---

# Get Github Repository Staleness

`GET /api/v1/sources/github/repository-staleness`

## Request

- Base URL: `https://api.teaflask.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.teaflask.com/api/v1/sources/github/repository-staleness`
- Auth: none declared

The price of a wired-once-and-forgotten production ref, computed at
read time: each configured non-default ref compared against the default
branch. Repositories on the default branch never compare (the
comparison collapses by definition), and a repository GitHub won't
answer for is left out rather than failing the read — this is an
advisory surface, not a gate. The base GET /sources/github stays
DB-only; this endpoint carries the GitHub round-trips.

## Response `200`

Successful Response

- GitHubRepositoryStalenessResponse: Only the actionable entries: repositories on the default branch, fresh refs, and repositories GitHub wouldn't answer for are all left out.
  - `stale` GitHubStaleProductionRef[], required
    - `repository_id` integer, required
    - `production_ref` string, required
    - `default_branch` string, required
    - `behind_by` integer, required
    - `production_tip_committed_at` string, date-time, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `422`: Validation error
- `500`: Internal server error

## Changes

- **2026-11-03** `c6ac9fd6657f`: 6 info
  - removed the `STEEP_LEARNING_DISABLED` enum value from the `error/code` response property for the response status `401`
  - removed the `STEEP_LEARNING_DISABLED` enum value from the `error/code` response property for the response status `403`
  - removed the `STEEP_LEARNING_DISABLED` enum value from the `error/code` response property for the response status `404`
  - removed the `STEEP_LEARNING_DISABLED` enum value from the `error/code` response property for the response status `405`
  - …2 more

[Operation history](https://skmtc.dev/teaflask/apis/teaflask-api/changes/api/v1/sources/github/repository-staleness/get.md)

---

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