GitHub branches & PRs
Organize milestone exports from the Official GitHub App into clean branches, reviewable pull requests, automated checks, and disciplined production releases.
How the Official GitHub App fits a PR workflow
ExaSpark connects to your GitHub account or organization through the Official GitHub App, granting scoped permissions strictly to repositories you select. Every export pushes clean, standard source code — pages, components, backend routes, and schema files — while omitting runtime secrets and live customer database rows.
Keep one clear boundary in mind: the Official GitHub App exports and pushes clean snapshots out from ExaSpark to GitHub. Arbitrary commits merged directly inside GitHub are not pulled automatically back into ExaSpark Preview or auto-deployed to ExaSpark Live.
With that boundary clear, GitHub acts as an authoritative hub for code review, automated CI checks, release tags, compliance archiving, and standalone engineering handoffs. See Inspect code & GitHub App for setup steps.
Two clean operating models for mixed teams
Pick one primary workflow early so founders working in ExaSpark and engineers reviewing on GitHub stay aligned.
| Operating model | Where edits originate | Role of GitHub branches & PRs | How production ships |
|---|---|---|---|
| ExaSpark-led studio + GitHub review hub | Builders iterate in ExaSpark Web Studio or Desktop App | Receive milestone snapshots, run CI tests, inspect security diffs, and capture review notes | Apply approved fixes in ExaSpark, test in Preview, click Publish |
| GitHub-owned standalone engineering | Engineers branch off the exported repo in VS Code or Cursor | Standard feature branches, peer PR reviews, automated tests, and protected main merges | Deploy independently through your own CI/CD pipeline |
Teams on Pro ($25/mo or $20/mo annually) include 3 builder seats plus unlimited free viewers directly inside ExaSpark, making the ExaSpark-led model fast during rapid product discovery.
When a growing company later transitions full maintenance to an internal engineering team, the exported repository is already standard web code requiring zero rewrites.
Organizing branches around milestone exports
Pushing twenty unrelated experiments in one giant export makes diffs unreadable. Instead, export right after finishing a single tested milestone — such as "booking cancellation rules" or "annual subscription upgrades."
Practical branch and tag conventions
# 1. Pull the latest verified milestone pushed from ExaSpark
git fetch origin
git checkout main
git pull --ff-only origin main
# 2. Cut a focused audit branch for local tests or review scripts
git checkout -b review/v1.3-stripe-webhooks
# 3. Run typechecks, linters, and automated tests locally
npm ci
npm run typecheck
npm test
# 4. Tag verified releases matching ExaSpark Publish milestones
git tag -a v1.3.0 -m "Publish v1.3.0: annual plans and invoice receipts"
git push origin v1.3.0If reviewers prefer formal Pull Requests before advancing main, export snapshots to a dedicated target branch (such as exaspark-snapshots) and open a Pull Request into main per milestone. That gives reviewers GitHub's diff view, inline comments, and required CI checks.
Step-by-step milestone review workflow
Tidy the workspace inside ExaSpark
Finish testing in Preview, remove unused prototype screens, and refresh
README.mdand.env.exampleso diffs stay clean.Push the milestone via the Official GitHub App
Export to your private repository so one commit captures one cohesive feature slice.
Open a milestone PR and run CI checks
Review changed files in GitHub while GitHub Actions runs typecheck, lint, unit tests, and dependency audits.
Bundle review notes into one deterministic prompt
Group required fixes (such as missing role checks or edge-case validation) into one concise ExaSpark prompt rather than scattered messages.
Re-verify, export the final snapshot, and Publish
Confirm fixes in Preview, push the clean commit to GitHub, tag the release, and click Publish to ship Live atomically.
Code-review hygiene checklist for AI-built snapshots
Engineering reviews move fastest when reviewers focus on security and data boundaries rather than cosmetic formatting:
- Server-side authorization and row ownership. Confirm every protected route verifies sessions, roles, and
user_idownership server-side — never trust hidden UI buttons alone. See Row-level data privacy. - Secret and credential hygiene. Scan diffs for hardcoded API keys, client-prefixed secrets, or accidentally committed
.envfiles. - Additive database migrations. Verify schema updates add nullable columns or new tables cleanly rather than dropping populated Live fields. See Schema migrations safely.
- Payment and webhook integrity. Confirm Stripe handlers check cryptographic signatures over raw request bytes, enforce idempotency, and read trusted server-side prices.
- Input validation and error boundaries. Ensure mutations validate request bodies cleanly and return
400JSON errors rather than raw stack traces.
Turn PR review findings into one focused ExaSpark pass:
Before we publish v1.4, remove unused prototype files, verify .env.example lists all required environment variable names without real values, and apply these three review fixes: enforce server-side admin role checks on DELETE /api/bookings/:id, add schema validation on POST /api/coupons/redeem, and index bookings(user_id, created_at).
Automating checks and managing releases cleanly
Lightweight GitHub Actions checks catch subtle type errors and broken invariants before customers encounter them. Pair Pull Request checks with crisp version tags matching your ExaSpark Publish history:
Recommended PR & Release Convention
- PR title: milestone(v1.4): subscription upgrades + invoice PDFs
- Automated CI: typecheck + lint + unit tests + GitHub Secret Scanning
- Git tag: Annotated tag v1.4.0 aligned with ExaSpark Publish
- Rollback rule: Keep schema changes additive so prior releases stay safeAnnotated Git tags create a permanent audit trail of every release shipped to production. If an unexpected regression hits Live, ExaSpark's 1-click Live rollback restores the prior release immediately while preserving live customer database rows. See Staging & release hygiene.
Common mistakes and troubleshooting
| Symptom | Root cause | Exact fix |
|---|---|---|
| Merged GitHub PR did not update Live | Official GitHub App exports snapshots rather than pulling external GitHub commits back | Apply approved fixes in ExaSpark and click Publish, or deploy from your own CI pipeline |
| PR diff touches 80 unrelated files | Multiple milestones piled up before exporting | Push smaller, single-feature snapshots after each verified Preview milestone |
| CI fails on missing env vars | Live secrets are intentionally excluded from GitHub exports | Add test-only values inside GitHub Actions Secrets matching .env.example |
| Teammate cannot open repository or PR | Private repo lacks collaborator permission | Grant Read or Write access inside GitHub repository settings |
| GitHub Secret Scanning rejects export | Literal API key exists in a source file or local commit | Revoke the key immediately, delete the literal string, and store it in environment settings |