caddy-shortcuts: regression after Forgejo port nuked 4 sites #120
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
After the port in #118, the first runner-side dispatch deleted 4 valid sites files (
api.caddy,eco-jobs-tracker.caddy,eco-mcp.caddy,galaxy-gen.caddy) even though at least eco-jobs-tracker and galaxy-gen have a validcoily.yamlon Forgejo withtailnet.shortcutset.Local repro of the new script crashed with
TypeError: list indices must be integers or slices, not str— the Forgejocontentsendpoint returned a list shape for some repo (presumably a directory match) and the script wasn't defending against that.Fixes in this commit:
fetch_confignow requiresresult["type"] == "file"before treating the response as a file payload.reconcilerefuses to delete more than half the existing sites in one run — a guardrail against future enumeration regressions silently nuking everything.FORGEJO_TOKENfrom the regenerate step: Forgejo's auto-injectedGITHUB_TOKENis scoped to the current repo only and can't read siblings; the script now relies on public-repo reads. Private repos with shortcuts won't render until a broader-scope token is set up (separate follow-up).coily caddy-shortcuts dry_run=1verb (Makefile target) for local testing.