Switch update-check tagsUrl to the public GitHub mirror #202

Open
opened 2026-08-12 03:53:05 +00:00 by Cordy · 2 comments
Owner

Follow-up to #180 (shipped v0.6.14, notify-only update-check against a configurable updates.tagsUrl).

Today the dogfood points tagsUrl at the private Forgejo repo (http://192.168.10.245/api/v1/repos/Cordy/Cairn/tags). When the GitHub mirror goes public (#27), switch the feed to it.

The switch is deliberately just config — the whole point of #180's design is that Forgejo and GitHub expose wire-compatible /tags JSON ([{"name":"vX.Y.Z"}]), so no code changes:

  • Set updates.tagsUrl → https://api.github.com/repos/<owner>/<repo>/tags in the cairn-enc-config secret.
  • Set updates.releaseUrlTemplate → https://github.com/<owner>/<repo>/releases/tag/{version}.
  • GitHub's unauthenticated API is rate-limited (60/hr per IP) — fine for the current on-demand-per-Settings-open check; only relevant if a future background/cached check is added.
  • Public repo ⇒ no token needed; keep updates.token empty.

Also decide here: whether the shipped default (for customers, in config.Default() / docs) should point at the public GitHub tags feed out of the box, so a fresh install checks upstream with zero config. Air-gapped installs override tagsUrl to their internal mirror (or unset check).

Do this at the same moment as the Paddle sandbox→live swap and the docs-site un-gating (the rest of the v0.8 going-public batch).

Follow-up to #180 (shipped v0.6.14, notify-only update-check against a configurable `updates.tagsUrl`). Today the dogfood points `tagsUrl` at the private Forgejo repo (`http://192.168.10.245/api/v1/repos/Cordy/Cairn/tags`). When the GitHub mirror goes public (#27), switch the feed to it. **The switch is deliberately just config** — the whole point of #180's design is that Forgejo and GitHub expose wire-compatible `/tags` JSON (`[{"name":"vX.Y.Z"}]`), so no code changes: - Set `updates.tagsUrl` → `https://api.github.com/repos/<owner>/<repo>/tags` in the `cairn-enc-config` secret. - Set `updates.releaseUrlTemplate` → `https://github.com/<owner>/<repo>/releases/tag/{version}`. - GitHub's unauthenticated API is rate-limited (60/hr per IP) — fine for the current on-demand-per-Settings-open check; only relevant if a future background/cached check is added. - Public repo ⇒ no token needed; keep `updates.token` empty. **Also decide here:** whether the *shipped default* (for customers, in `config.Default()` / docs) should point at the public GitHub tags feed out of the box, so a fresh install checks upstream with zero config. Air-gapped installs override `tagsUrl` to their internal mirror (or unset `check`). Do this at the same moment as the Paddle sandbox→live swap and the docs-site un-gating (the rest of the v0.8 going-public batch).
Cordy added this to the v1.0 - Go live milestone 2026-08-12 03:53:05 +00:00
Author
Owner

Triage: tandem/launch (v0.8, gated on #27). Already fully scoped above — a one-line tagsUrl/releaseUrlTemplate config swap in the cairn-enc-config secret, plus the decision on whether the shipped default points at public GitHub. Do it in the going-public batch with #26/#27.

**Triage: tandem/launch (v0.8, gated on #27).** Already fully scoped above — a one-line `tagsUrl`/`releaseUrlTemplate` config swap in the `cairn-enc-config` secret, plus the decision on whether the shipped default points at public GitHub. Do it in the going-public batch with #26/#27.
Author
Owner

Since v0.6.313 (#793) the shipped default is in code, so this issue now includes a one-line code change besides the dogfood config:

  • internal/config/config.go: fill DefaultUpdatesTagsURL (https://api.github.com/repos/<owner>/<repo>/tags) and DefaultUpdatesReleaseURL (https://github.com/<owner>/<repo>/releases/tag/{version}). While they are empty, the update check stays off on a fresh instance instead of failing daily; filling them turns it on by default for every instance without an updates block.
  • No per_page needed in the URL: the check asks for 100 per page and follows Link: rel="next" itself.
  • Then flip the one sentence in docs/handbook/updates.md ("Until the public mirror exists (#27), release builds carry no built-in feed…") and the deployment.md bullet.
  • Dogfood configs that set tagsUrl to the internal Forgejo can then drop their updates block.
Since v0.6.313 (#793) the shipped default is in code, so this issue now includes a one-line code change besides the dogfood config: - `internal/config/config.go`: fill `DefaultUpdatesTagsURL` (`https://api.github.com/repos/<owner>/<repo>/tags`) and `DefaultUpdatesReleaseURL` (`https://github.com/<owner>/<repo>/releases/tag/{version}`). While they are empty, the update check stays off on a fresh instance instead of failing daily; filling them turns it on by default for every instance without an `updates` block. - No `per_page` needed in the URL: the check asks for 100 per page and follows `Link: rel="next"` itself. - Then flip the one sentence in `docs/handbook/updates.md` ("Until the public mirror exists (#27), release builds carry no built-in feed…") and the deployment.md bullet. - Dogfood configs that set `tagsUrl` to the internal Forgejo can then drop their `updates` block.
Sign in to join this conversation.
No labels
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: Cordy/Cairn#202
No description provided.