Skip to content

refactor(modable): drop gh auto-create from --modable#125

Merged
UtkarshBhardwaj007 merged 2 commits intomainfrom
feat/remove-gh-auto-create-modable
May 6, 2026
Merged

refactor(modable): drop gh auto-create from --modable#125
UtkarshBhardwaj007 merged 2 commits intomainfrom
feat/remove-gh-auto-create-modable

Conversation

@UtkarshBhardwaj007
Copy link
Copy Markdown
Member

Summary

  • dot deploy --modable no longer auto-creates a GitHub repo. The CLI reads an existing public GitHub origin or fails with an actionable message; missing origin, private repos, and non-GitHub URLs all hard-fail at preflight.
  • The gh CLI dependency is removed end-to-end: dot init no longer installs it, the isGhAuthenticated advisory is gone, and --repo-name is dropped.
  • dot mod baseline reduced to git init only (no commit) so it never depends on global user.name/user.email.
  • New ModableErrorStage in the deploy TUI renders the formal warning inside a yellow Callout banner (matching the "check your phone" sign-request style) and exits cleanly on Enter/Esc.

Why

Auto-creating a public repo on the user's GitHub account from a "deploy" command was a meaningful side effect, hard-required gh + an out-of-band gh auth login (because Ink owns stdio), and the failure path already routed users back to their shell anyway. This brings dot in line with how every other deploy CLI (Vercel, Netlify, fly.io) handles source publishing: the user sets up the repo themselves, the CLI consumes the result.

Test plan

  • pnpm tsc --noEmit clean (verified locally).
  • pnpm test clean — 483/483 passing locally.
  • Headless deploy with no origin: dot deploy --signer dev --suri //Alice --domain test --buildDir dist --playground --modable exits non-zero with the formal warning.
  • Headless deploy with a non-GitHub origin (e.g. git remote add origin https://gitlab.com/foo/bar): same hard-fail with the new "must use a public GitHub repository" error.
  • Headless deploy with a public GitHub origin: succeeds; metadata JSON contains repository and branch.
  • Interactive deploy with no origin → opt into modable: yellow Callout banner renders, Enter or Esc exits cleanly with exit code 1.
  • dot mod against any modable app produces a directory with a .git/ and an unborn HEAD (no baseline commit).
  • dot init does not attempt to install gh and does not show the gh auth login advisory.

The user is now responsible for setting up a public GitHub origin
themselves; dot deploy --modable consumes the existing origin or fails
with an actionable message. Removes the gh CLI dependency end-to-end:

- modable preflight: read origin, validate public via HEAD on github.com
  HTML page, or hard-fail. Non-GitHub URLs now also hard-fail (dot mod
  only fetches from codeload.github.com).
- DeployScreen: ModablePreflightStage simplified; new ModableErrorStage
  renders the formal warning inside a yellow Callout matching the phone
  banner, dismissed on enter/esc.
- dot mod: createOptionalGitBaseline reduced to git init only; no
  baseline commit (avoids requiring user.name/user.email).
- dot init: GitHub CLI toolchain step and gh auth advisory deleted.
- Telemetry: isExpectedCliError regex updated for the new error wording.
- Drops --repo-name flag and the validateRepoName helper.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Dev build ready — try this branch:

curl -fsSL https://raw.githubusercontent.com/paritytech/playground-cli/main/install.sh | VERSION=dev/feat/remove-gh-auto-create-modable bash

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

E2E Test Pass · ✅ PASS

Tag: e2e-ci-pr · Branch: feat/remove-gh-auto-create-modable · Commit: 979c29d · Run logs

Cell Result Time
pr-deploy-frontend ✅ PASS 7m10s
pr-preflight ✅ PASS 2m25s
pr-install ✅ PASS 0m45s
pr-deploy-cdm ✅ PASS 2m49s
pr-mod ✅ PASS 1m27s
pr-init-session ✅ PASS 1m42s
pr-deploy-foundry ✅ PASS 2m26s
${{ matrix.cell }} ⏭️ SKIP 0m00s
${{ matrix.cell }} ⏭️ SKIP 0m00s

Sentry traces: view spans for this run

@UtkarshBhardwaj007 UtkarshBhardwaj007 merged commit c2a4f01 into main May 6, 2026
19 checks passed
@UtkarshBhardwaj007 UtkarshBhardwaj007 deleted the feat/remove-gh-auto-create-modable branch May 6, 2026 09:26
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