chore: migrate forge back to GitHub, keep Codeberg auth - #124
Merged
Conversation
The dotfiles source is moving back to github.com/aguil/dotfiles. Codeberg hosted runners forced a codeberg-medium label with a 10-minute cap and a full-URL pin for jdx/mise-action, since code.forgejo.org does not mirror it. Both workarounds are unnecessary on GitHub-hosted runners. Codeberg auth (fj, SSH key, 1Password refs) stays in place for other repos.
The chezmoi source origin moves to github.com/aguil/dotfiles, so gh owns it. The gh wrapper already guards its chezmoi-source branch on the remote matching github.com; the fj wrapper claimed the source unconditionally. Drop that branch. It was already redundant with the unconditional fallback below it, so fj still reaches Codeberg from anywhere. Codeberg auth, the ~/dev/repos/<host>/<user> route, and fj-routes.d overlays are untouched.
The dotfiles source now lives on github.com/aguil/dotfiles, so gh (not fj) owns it. Update the forgejo/github CLI skills, CI references, and the Codeberg sections of the README and repo-maintenance docs. Codeberg remains a supported forge for other repos; only the claim that the chezmoi source is Codeberg-hosted is removed.
The Codeberg user/host/op-refs were only ever supplied by remote inference or env vars. Their promptStringOnce fallbacks check root keys (.gitPersonalCodebergUser, .codebergHost, ...) that the template never writes back into [data], so 'Once' never engaged and the prompt was simply unreachable while origin was on Codeberg. With origin on GitHub, inference goes empty and the prompts become reachable, so 'chezmoi init' now blocks on a TTY and fails non-interactively. Fall back to the existing [data.codeberg] and [data.ssh.personal] values before prompting, so an already-configured machine re-inits unattended and Codeberg auth survives the origin move.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves this repo's forge back to GitHub. Codeberg auth stays fully intact — it
just no longer claims
aguil/dotfiles.Why
CI friction on Codeberg. The last three CI commits were all workarounds for the
hosted runners: a
codeberg-mediumlabel becauseubuntu-latestis not served(and the smaller runners' 10-minute cap could not fit an uncached mise toolchain
install), and a full-URL pin for
jdx/mise-actionbecausecode.forgejo.orgdoes not mirror it. Both are unnecessary on GitHub-hosted runners.
What changed
.forgejo/workflows/pre-commit.yaml→.github/workflows/pre-commit.yaml,runs-on: ubuntu-latest, mise-action unpinned. Themise exec --lockedshapeand the mise-security env hardening are kept as-is (this is not a revert to
the pre-chore: migrate forge back to GitHub, keep Codeberg auth #124 workflow, which used
setup-python/setup-node/pre-commit/action).fj()wrapper. Thegh()wrapper already guards its equivalent branch on the remote matchinggithub.com, so it picks the repo up automatically;fjhad no such guard.That block was already redundant with the unconditional fallback below it, so
fjstill reaches Codeberg from anywhere.by remote inference or env vars. Their
promptStringOncefallbacks key offroot names (
.gitPersonalCodebergUser,.codebergHost, …) that the templatenever writes back into
[data], so "Once" never engaged — the prompts weresimply unreachable while
originwas on Codeberg. Withoriginon GitHub,inference goes empty, the prompts become reachable, and
chezmoi initblockson a TTY. Now falls back to existing
[data.codeberg]/[data.ssh.personal]values first.and
docs/repo-maintenance.mdno longer claim the chezmoi source isCodeberg-hosted.
Deliberately unchanged
fj,03-fj-default-config.sh,run_after_23-codeberg-ssh-key,run_after_24-codeberg-fj-auth,[data.codeberg],dot_ssh/config.tmpl,docs/chezmoi-profiles.md, and the~/dev/repos/codeberg.org/<user>git/jjscopes. Codeberg remains a fully supported forge for other repos.
Verification
chezmoi initwith everyCHEZMOI_CODEBERG_*/ identity-file env var unsetcompletes unattended, and the rendered
chezmoi.tomlis byte-identical tothe pre-migration file — Codeberg auth preserved.
pre-commit run --all-filesclean; 24 Neovim Lua tests pass.gh repo viewfrom the chezmoi source resolvesaguil/dotfilesvia~/.config/gh-personal.CI on this PR is the real test of the workflow move.