console icon indicating copy to clipboard operation
console copied to clipboard

Switch to branch deployments in one-click deployments

Open atharvadeosthale opened this issue 3 months ago β€’ 2 comments

Ditches the release tag based deployments on one-click deployments, and rather uses branches instead. This means target repository doesn't need to have releases anymore.

Summary by CodeRabbit

  • New Features

    • Branch-based deployments: detect branches from repo URLs, load/validate branches and add a branch selector in deploy flows.
    • Quick deploy via URL to create sites/functions and start deployments automatically.
    • Environment variable parsing supports KEY and KEY=VALUE pairs with prefilled values.
  • Bug Fixes / Improvements

    • Default runtime updated to Node22; removed tag-based deployment paths in favor of branches.
    • Improved error handling, user notifications and billing/project-limit UI guards; payload now exposes parsed env vars.

✏️ Tip: You can customize this high-level summary in your review settings.

atharvadeosthale avatar Nov 26 '25 21:11 atharvadeosthale

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
Β console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

[!TIP] Messaging handles push notifications, emails, and SMS through one unified API

appwrite[bot] avatar Nov 26 '25 21:11 appwrite[bot]

Walkthrough

Replaced tag-based deployment flows with branch-based flows across console and public pages for functions and sites. Added Git helpers: getBranchFromUrl, getBranches, validateBranch, and loadAndSelectBranch; removed some getLatestTag usages and certain console.error logs. Pages now load/validate branches, expose selectedBranch/branches, and create deployments with Type.Branch referencing the selected branch. Introduced parseEnvParam and a structured envVars: Array<{ key: string; value: string }> while keeping envKeys for backward compatibility. Added quick-deploy automations that create resources, domain rules, environment variables, and deployments, adjusted load signatures/returns, and bumped default function runtime to Runtime.Node22.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Areas requiring extra attention:

  • New Git helpers and branch-loading API interactions (getBranchFromUrl, getBranches, validateBranch, loadAndSelectBranch) β€” URL parsing, fetch/error handling, and fallback semantics.
  • parseEnvParam and compatibility mapping between envVars and legacy envKeys.
  • Async branch-loading and validation flows in Svelte pages (onMount and load handlers) β€” potential race conditions and UI disabled states.
  • Quick-deploy flows that create resources, domain rules, environment variables, and deployments, plus redirect/error handling.
  • Changes to load function signatures and returned payloads consumed by multiple routes (ensure callers handle envVars and optional branch).

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
βœ… Passed checks (2 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title 'Switch to branch deployments in one-click deployments' accurately and specifically summarizes the primary change: replacing release tag-based deployments with branch-based deployments across one-click deployment flows.
✨ Finishing touches
  • [ ] πŸ“ Generate docstrings
πŸ§ͺ Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch one-click-updates

πŸ“œ Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 7bc21f2a4715d78633b615652d5a67639c283d9a and 6e2724bbe4b27dbd7d6af31ed68bea9084fb24c0.

πŸ“’ Files selected for processing (1)
  • src/lib/helpers/github.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/helpers/github.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 26 '25 21:11 coderabbitai[bot]