Skip to content

chore: migrate forge back to GitHub, keep Codeberg auth - #124

Merged
aguil merged 4 commits into
masterfrom
chore/migrate-forge-to-github
Aug 9, 2026
Merged

chore: migrate forge back to GitHub, keep Codeberg auth#124
aguil merged 4 commits into
masterfrom
chore/migrate-forge-to-github

Conversation

@aguil

@aguil aguil commented Aug 9, 2026

Copy link
Copy Markdown
Owner

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-medium label because ubuntu-latest is 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-action because code.forgejo.org
does not mirror it. Both are unnecessary on GitHub-hosted runners.

What changed

  • CI.forgejo/workflows/pre-commit.yaml.github/workflows/pre-commit.yaml,
    runs-on: ubuntu-latest, mise-action unpinned. The mise exec --locked shape
    and 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).
  • Routing — dropped the chezmoi-source branch from the fj() wrapper. The
    gh() wrapper already guards its equivalent branch on the remote matching
    github.com, so it picks the repo up automatically; fj had no such guard.
    That block was already redundant with the unconditional fallback below it, so
    fj still reaches Codeberg from anywhere.
  • Config stability — the Codeberg user/host/op-refs were only ever supplied
    by remote inference or env vars. Their promptStringOnce fallbacks key off
    root names (.gitPersonalCodebergUser, .codebergHost, …) that the template
    never writes back into [data], so "Once" never engaged — the prompts were
    simply unreachable while origin was on Codeberg. With origin on GitHub,
    inference goes empty, the prompts become reachable, and chezmoi init blocks
    on a TTY. Now falls back to existing [data.codeberg] /
    [data.ssh.personal] values first.
  • Docs/skills — forgejo-cli, github-cli and mise-security skills, README,
    and docs/repo-maintenance.md no longer claim the chezmoi source is
    Codeberg-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/jj
scopes. Codeberg remains a fully supported forge for other repos.

Verification

  • chezmoi init with every CHEZMOI_CODEBERG_* / identity-file env var unset
    completes unattended, and the rendered chezmoi.toml is byte-identical to
    the pre-migration file — Codeberg auth preserved.
  • pre-commit run --all-files clean; 24 Neovim Lua tests pass.
  • gh repo view from the chezmoi source resolves aguil/dotfiles via
    ~/.config/gh-personal.

CI on this PR is the real test of the workflow move.

aguil added 4 commits August 8, 2026 19:00
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.
@aguil
aguil merged commit 5f4fe19 into master Aug 9, 2026
1 check passed
@aguil
aguil deleted the chore/migrate-forge-to-github branch August 9, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant