fix(enable): make GitHub repo creation and push explicit opt-ins

main

Commit

computermode2mo ago

Previously the bootstrap seeded push := useGitHub && commit (true) and useGitHub := !opts.NoGitHub (true), flipping them to No only via the interactive prompt. So a non-interactive run (e.g. entire enable --init-repo in CI) created a GitHub repo and pushed the directory's contents with no explicit opt-in — the interactive default-No was not the real default.

Now both are explicit opt-ins:

  • Create the GitHub repo only on an explicit signal (--repo-*, --push, --yes) or an interactive "yes". Non-interactive with no signal stays local-only and never probes gh.
  • Push only on --push/--yes or an interactive "yes"; otherwise the repo is created but left unpushed, with manual git push guidance printed.

Adds a --push flag (implies creating the remote; mutually exclusive with --no-github and --skip-initial-commit) and updates --yes help to mention push.

Tests updated to reflect the new default (no-flags stays local; repo flags create-without-push) and cover the --push path and flag exclusivity.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com Entire-Checkpoint: 01KXE4XZ12S5VJGDTTVCSQG0SN

Checkpoints

Fix Enable Bootstrap Prompts and Defaults

Claude CodeOpus 4.8
View session
Checkpoint 1