github RayLabsHQ/gitea-mirror v3.15.3

11 hours ago

What's Changed

Bug fix release — GH_API_URL now applies across all GitHub API call sites, not just a subset.

Fixed

  • GitHub Enterprise routing (GH_API_URL) was silently ignored by several Octokit call sites (#269, #273). The helper createGitHubClient() honored the env var, but six other sites constructed new Octokit(...) directly and always hit api.github.com:

    • POST /api/github/test-connection — the Test Connection button in the GitHub settings panel (most visible failure; reported as 401 from api.github.com/user even with GH_API_URL set)
    • POST /api/sync/repository — public-repo add-by-URL
    • Force-push detection and metadata Octokit in gitea-enhanced.ts
    • Three scheduler paths (auto-discovery, auto-mirror, auto-start)
    • Dev harness test-metadata-mirroring.ts

    All sites now route through createGitHubClient() (or read GH_API_URL inline where unauthenticated fast-fail is needed), so GHES and GHEC with data residency work end-to-end.

  • Scheduler paths now also get the throttling plugin, per-user rate-limit tracking, and the standard gitea-mirror/<version> (user:<login>) User-Agent that other paths already had.

Configuration reminder

# GHES (self-hosted)
GH_API_URL=https://ghe.example.com/api/v3

# GHEC with data residency
GH_API_URL=https://api.TENANT.ghe.com

Docs: README — GitHub Enterprise, env reference

Verification

All 231 unit tests pass. bun run build succeeds.

Full Changelog: v3.15.2...v3.15.3

Don't miss a new gitea-mirror release

NewReleases is sending notifications on new releases.