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 modelWhere edits originateRole of GitHub branches & PRsHow production ships
ExaSpark-led studio + GitHub review hubBuilders iterate in ExaSpark Web Studio or Desktop AppReceive milestone snapshots, run CI tests, inspect security diffs, and capture review notesApply approved fixes in ExaSpark, test in Preview, click Publish
GitHub-owned standalone engineeringEngineers branch off the exported repo in VS Code or CursorStandard feature branches, peer PR reviews, automated tests, and protected main mergesDeploy 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

bash
# 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.0

If 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

  1. Tidy the workspace inside ExaSpark

    Finish testing in Preview, remove unused prototype screens, and refresh README.md and .env.example so diffs stay clean.

  2. Push the milestone via the Official GitHub App

    Export to your private repository so one commit captures one cohesive feature slice.

  3. Open a milestone PR and run CI checks

    Review changed files in GitHub while GitHub Actions runs typecheck, lint, unit tests, and dependency audits.

  4. 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.

  5. 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_id ownership 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 .env files.
  • 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 400 JSON errors rather than raw stack traces.

Turn PR review findings into one focused ExaSpark pass:

Starter prompt · App

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:

text
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 safe

Annotated 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

SymptomRoot causeExact fix
Merged GitHub PR did not update LiveOfficial GitHub App exports snapshots rather than pulling external GitHub commits backApply approved fixes in ExaSpark and click Publish, or deploy from your own CI pipeline
PR diff touches 80 unrelated filesMultiple milestones piled up before exportingPush smaller, single-feature snapshots after each verified Preview milestone
CI fails on missing env varsLive secrets are intentionally excluded from GitHub exportsAdd test-only values inside GitHub Actions Secrets matching .env.example
Teammate cannot open repository or PRPrivate repo lacks collaborator permissionGrant Read or Write access inside GitHub repository settings
GitHub Secret Scanning rejects exportLiteral API key exists in a source file or local commitRevoke the key immediately, delete the literal string, and store it in environment settings

Next steps

Still have a question?Ask our team and other builders on Discord.

From the blog