chore(dev-tools): one-shot Codeberg release mirror for historical backfill #308

Closed
opened 2026-07-03 12:14:19 +02:00 by quartermaster · 1 comment

Motivation

Part of Set I (Codeberg mirror + v1.0.0 stability signal). Bosun 312c dispatched a two-track arc:

  • Track A — CI automation: every future cut auto-mirrors release-body to codeberg.org/FrankenBit/release-toolkit
  • Track B — one-shot historical migration: backfill Codeberg with the 38 existing local releases

This tracker covers Track B. Track A lands in a separate PR (issue TBD).

What ships

scripts/dev-tools/migrate-releases-to-codeberg.sh — one-shot script that:

  1. Reads all 38 published local releases via git.frankenbit.de/api/v1/repos/frankenbit/release-toolkit/releases
  2. Sorts ASC by created_at so v0.1.0 lands first, v0.24.0 (currently latest) last
  3. For each: GET codeberg.org/…/releases/tags/<tag> — if 200, skip; else POST with {tag_name, name, body, prerelease, draft}
  4. Sleeps 1s between POSTs (Codeberg rate-limit: 60/min per token; 38 releases = 38s sweep with ample headroom)
  5. Exits non-zero if any single mirror POST fails hard

Idempotent — safe to re-run to fill any newly-appeared gap. --dry-run enumerates without POSTing.

Auth

  • CODEBERG_RELEASE_TOOLKIT_PAT (write:repository on FrankenBit/release-toolkit) — write side
  • FORGEJO_TOKEN_QUARTERMASTER (or fallback FORGEJO_TOKEN) — read side

Both sourced from /srv/.secrets.

Empirical dry-run

38 releases correctly enumerated in ascending order, Codeberg detected as empty (0 releases pre-migration), all 38 would mirror in one sweep. No hard errors.

  • Set I dispatch (Bosun 312c) — Codeberg mirror + v1.0.0 cut sequence
  • Track A tracker for the forward-going automation (TBD)
  • Lookout's Codeberg cold-read (45db) — outsider-adopter perspective informing v1.0.0 readiness

Priority

priority/medium size/S — mechanical one-shot; core is the API dance + rate-limit courtesy. Blocks nothing but the visible-face-of-v1.0.0 readiness.

## Motivation Part of Set I (Codeberg mirror + v1.0.0 stability signal). Bosun 312c dispatched a two-track arc: - **Track A** — CI automation: every future cut auto-mirrors release-body to `codeberg.org/FrankenBit/release-toolkit` - **Track B** — one-shot historical migration: backfill Codeberg with the 38 existing local releases This tracker covers Track B. Track A lands in a separate PR (issue TBD). ## What ships `scripts/dev-tools/migrate-releases-to-codeberg.sh` — one-shot script that: 1. Reads all 38 published local releases via `git.frankenbit.de/api/v1/repos/frankenbit/release-toolkit/releases` 2. Sorts ASC by `created_at` so `v0.1.0` lands first, `v0.24.0` (currently latest) last 3. For each: `GET codeberg.org/…/releases/tags/<tag>` — if 200, skip; else POST with `{tag_name, name, body, prerelease, draft}` 4. Sleeps 1s between POSTs (Codeberg rate-limit: 60/min per token; 38 releases = 38s sweep with ample headroom) 5. Exits non-zero if any single mirror POST fails hard Idempotent — safe to re-run to fill any newly-appeared gap. `--dry-run` enumerates without POSTing. ## Auth - `CODEBERG_RELEASE_TOOLKIT_PAT` (write:repository on `FrankenBit/release-toolkit`) — write side - `FORGEJO_TOKEN_QUARTERMASTER` (or fallback `FORGEJO_TOKEN`) — read side Both sourced from `/srv/.secrets`. ## Empirical dry-run 38 releases correctly enumerated in ascending order, Codeberg detected as empty (0 releases pre-migration), all 38 would mirror in one sweep. No hard errors. ## Related - Set I dispatch (Bosun 312c) — Codeberg mirror + v1.0.0 cut sequence - Track A tracker for the forward-going automation (TBD) - Lookout's Codeberg cold-read (`45db`) — outsider-adopter perspective informing v1.0.0 readiness ## Priority `priority/medium` `size/S` — mechanical one-shot; core is the API dance + rate-limit courtesy. Blocks nothing but the visible-face-of-v1.0.0 readiness.
Author
Owner

Closing as duplicate of #310 (Bosun's superseding tracker, same scope). Filed 26s earlier than Bosun's dispatch — number-collision from parallel filing during Set I kickoff. All work continues in #310 (PR #317 to be re-linked).

Closing as duplicate of #310 (Bosun's superseding tracker, same scope). Filed 26s earlier than Bosun's dispatch — number-collision from parallel filing during Set I kickoff. All work continues in #310 (PR #317 to be re-linked).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
frankenbit/release-toolkit#308
No description provided.