Skip to content

fix(cli): pass fallbackFile and VCS fields through push sites - #1687

Merged
ChiragAgg5k merged 1 commit into
mainfrom
fix/cli-push-sites-fallback-vcs
Jul 25, 2026
Merged

fix(cli): pass fallbackFile and VCS fields through push sites#1687
ChiragAgg5k merged 1 commit into
mainfrom
fix/cli-push-sites-fallback-vcs

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

Summary

appwrite push sites drops fallbackFile and git/VCS fields from create/update payloads, so values in appwrite.config.json are ignored even though sites create / sites update already accept them.

This updates the CLI templates so generated sdk-for-cli:

  • Passes fallbackFile, installationId, providerRepositoryId, providerBranch, providerSilentMode, and providerRootDirectory on both create and update in pushSites
  • Allows the VCS fields in the strict site config schema
  • Includes them when pulling sites so config round-trips

Originally reported in appwrite/sdk-for-cli#344. A direct fix to sdk-for-cli (#345) was closed in favor of landing this in sdk-generator.

Test plan

  • Regenerate the CLI SDK from these templates
  • Set fallbackFile: "index.html" on a site in appwrite.config.json
  • Run appwrite push sites --site-id <id> --force
  • Run appwrite sites get --site-id <id> and confirm fallbackFile is set
  • Optionally set installationId / providerRepositoryId / providerBranch / providerRootDirectory / providerSilentMode and confirm they are applied on push
  • appwrite pull sites writes those fields back into the config

push sites ignored SPA fallbackFile and git connection fields from
appwrite.config.json even though sites create/update already accept
them. Pass them through on create/update, allow them in the site
config schema, and include them when pulling sites so config round-trips.

Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR restores site configuration round-tripping in the generated CLI.

  • Allows the five VCS properties in the strict site configuration schema.
  • Copies fallback and VCS properties into pulled site configurations.
  • Passes fallback and VCS properties through both create and update push payloads.

Confidence Score: 5/5

The PR appears safe to merge, with the new fields consistently represented across configuration validation, pull, and both push paths.

The changes propagate matching optional site properties through the complete config round-trip without introducing a concrete build, runtime, data-integrity, or security failure.

Important Files Changed

Filename Overview
templates/cli/lib/commands/config.ts Extends the strict site schema with optional VCS fields whose names and types align with the new pull and push mappings.
templates/cli/lib/commands/pull.ts Preserves VCS properties from site responses when writing site configuration, completing the pull side of round-tripping.
templates/cli/lib/commands/push.ts Adds fallback and VCS properties symmetrically to site creation and update payloads; no concrete regression was identified.

Reviews (1): Last reviewed commit: "fix(cli): pass fallbackFile and VCS fiel..." | Re-trigger Greptile

@ChiragAgg5k
ChiragAgg5k merged commit 2ecfa19 into main Jul 25, 2026
60 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/cli-push-sites-fallback-vcs branch July 25, 2026 03: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