From 9ad08694ed694fd183995010e1d5fe9d8d53b768 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 23:01:33 +0000 Subject: [PATCH 1/6] Initial plan From 627adb43e0a3e3ab680506a050b6e8bb1686f915 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 23:12:28 +0000 Subject: [PATCH 2/6] Add access_type=offline and prompt=consent to Google OAuth2 login URL to enable refresh tokens Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com> --- src/Appwrite/Auth/OAuth2/Google.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Auth/OAuth2/Google.php b/src/Appwrite/Auth/OAuth2/Google.php index c6f621b814..79894c2422 100644 --- a/src/Appwrite/Auth/OAuth2/Google.php +++ b/src/Appwrite/Auth/OAuth2/Google.php @@ -53,7 +53,9 @@ class Google extends OAuth2 'redirect_uri' => $this->callback, 'scope' => \implode(' ', $this->getScopes()), 'state' => \json_encode($this->state), - 'response_type' => 'code' + 'response_type' => 'code', + 'access_type' => 'offline', + 'prompt' => 'consent' ]); } From c910c98b32bda791dda1707612e2455f40669a2d Mon Sep 17 00:00:00 2001 From: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:18:49 +0000 Subject: [PATCH 3/6] chore: install ssh and gh commands for dev This will allow creating github releases for SDKs --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 2a3e176838..3d03ce112c 100755 --- a/Dockerfile +++ b/Dockerfile @@ -98,6 +98,7 @@ RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/ # Enable Extensions RUN if [ "$DEBUG" = "true" ]; then cp /usr/src/code/dev/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini; fi RUN if [ "$DEBUG" = "true" ]; then mkdir -p /tmp/xdebug; fi +RUN if [ "$DEBUG" = "true" ]; then apk add --update --no-cache openssh-client github-cli; fi RUN if [ "$DEBUG" = "false" ]; then rm -rf /usr/src/code/dev; fi RUN if [ "$DEBUG" = "false" ]; then rm -f /usr/local/lib/php/extensions/no-debug-non-zts-20230831/xdebug.so; fi From 9b52f6f8f61f152bdbd088426d8355cb01ce6105 Mon Sep 17 00:00:00 2001 From: Harsh Mahajan <127186841+HarshMN2345@users.noreply.github.com> Date: Thu, 6 Nov 2025 14:17:31 +0530 Subject: [PATCH 4/6] Add new tips to Comment class --- src/Appwrite/Vcs/Comment.php | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Vcs/Comment.php b/src/Appwrite/Vcs/Comment.php index 2a08b701f0..57a36ec164 100644 --- a/src/Appwrite/Vcs/Comment.php +++ b/src/Appwrite/Vcs/Comment.php @@ -11,9 +11,36 @@ class Comment { // TODO: Add more tips protected array $tips = [ - 'Appwrite has a Discord community with over 16 000 members.', - 'You can use Avatars API to generate QR code for any text or URLs.', - 'Cursor pagination performs better than offset pagination when loading further pages.', + 'Appwrite has crossed the 50K GitHub stars milestone with hundreds of active contributors', + 'Our Discord community has grown to 24K developers, and counting', + 'Sites auto-generate unique domains with the pattern https://randomstring.appwrite.network', + 'Every Git commit and branch gets its own deployment URL automatically', + 'Custom domains work with both CNAME for subdomains and NS records for apex domains', + 'HTTPS and SSL certificates are handled automatically for all your Sites', + 'Functions can run for up to 15 minutes before timing out', + 'Schedule functions to run as often as every minute with cron expressions', + 'Environment variables can be scoped per function or shared across your project', + 'Function scopes give you fine-grained control over API permissions', + 'Sites support three domain rule types: Active deployment, Git branch, and Redirect', + 'Preview deployments create instant URLs for every branch and commit', + 'Trigger functions via HTTP, SDKs, events, webhooks, or scheduled cron jobs', + 'Each function runs in its own isolated container with custom environment variables', + 'Build commands execute in runtime containers during deployment', + 'Dynamic API keys are generated automatically for each function execution', + 'JWT tokens let functions act on behalf of users while preserving their permissions', + 'Storage files get ClamAV malware scanning and encryption by default', + 'Roll back Sites deployments instantly by switching between versions', + 'Git integration provides automatic deployments with optional PR comments', + 'Silent mode disables those chatty PR comments if you prefer peace and quiet', + 'Environment variable changes require redeployment to take effect', + 'SSR frameworks are fully supported with configurable build runtimes', + 'Global CDN and DDoS protection come free with every Sites deployment', + 'Deploy functions via zip upload or connect directly to your Git repo', + 'Realtime gives you live updates for users, storage, functions, and databases', + 'GraphQL API works alongside REST and WebSocket protocols', + 'Messaging handles push notifications, emails, and SMS through one unified API', + 'Teams feature lets you group users with membership management and role permissions', + 'MCP server integration brings LLM superpowers to Claude Desktop and Cursor IDE', ]; protected string $statePrefix = '[appwrite]: #'; From ad6aff6af2e6b745773ec02e93cc450b99048ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 6 Nov 2025 13:24:17 +0100 Subject: [PATCH 5/6] remove locale cache --- app/controllers/api/locale.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/controllers/api/locale.php b/app/controllers/api/locale.php index 2c8a38de07..69bf766323 100644 --- a/app/controllers/api/locale.php +++ b/app/controllers/api/locale.php @@ -37,7 +37,6 @@ App::get('/v1/locale') $currencies = Config::getParam('locale-currencies'); $output = []; $ip = $request->getIP(); - $time = (60 * 60 * 24 * 45); // 45 days cache $output['ip'] = $ip; @@ -68,10 +67,6 @@ App::get('/v1/locale') $output['currency'] = $currency; } - $response - ->addHeader('Cache-Control', 'public, max-age=' . $time) - ->addHeader('Cache-Control', 'private, max-age=3888000') // 45 days - ; $response->dynamic(new Document($output), Response::MODEL_LOCALE); }); From 2aa2b8df91f3ac076d36f8c330be328de66823af Mon Sep 17 00:00:00 2001 From: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:24:41 +0000 Subject: [PATCH 6/6] chore: set GITHUB_TOKEN and git email at runtime --- docker-compose.override.yml | 7 +++++++ docs/tutorials/release-sdks.md | 31 +++++++++++----------------- src/Appwrite/Platform/Tasks/SDKs.php | 2 ++ 3 files changed, 21 insertions(+), 19 deletions(-) create mode 100644 docker-compose.override.yml diff --git a/docker-compose.override.yml b/docker-compose.override.yml new file mode 100644 index 0000000000..52c5058ab9 --- /dev/null +++ b/docker-compose.override.yml @@ -0,0 +1,7 @@ +services: + appwrite: + # volumes: + # - ~/.ssh:/root/.ssh + environment: + - GH_TOKEN= + - GIT_EMAIL= diff --git a/docs/tutorials/release-sdks.md b/docs/tutorials/release-sdks.md index 99c0fa4fd3..0e03beca71 100644 --- a/docs/tutorials/release-sdks.md +++ b/docs/tutorials/release-sdks.md @@ -26,34 +26,27 @@ Before releasing SDKs, you need to: To enable SDK releases via GitHub, you need to mount SSH keys and configure GitHub authentication in your Docker environment. -#### Update Dockerfile +#### Update docker-compose.override.yml -Add the following configuration to your `Dockerfile`: - -```dockerfile -ARG GH_TOKEN -ENV GH_TOKEN=your_github_token_here -RUN git config --global user.email "your-email@example.com" -RUN apk add --update --no-cache openssh-client github-cli -``` - -Replace: -- `your_github_token_here` with your GitHub personal access token (with appropriate permissions) -- `your-email@example.com` with your Git email address - -#### Update docker-compose.yml - -Add the SSH key volume mount to the `appwrite` service in `docker-compose.yml`: +Update `docker-compose.override.yml` to mount SSH keys and set environment variables for the `appwrite` service: ```yaml services: appwrite: volumes: - ~/.ssh:/root/.ssh - # ... other volumes + environment: + - GH_TOKEN=your_github_token_here + - GIT_EMAIL=your-email@example.com ``` -This mounts your SSH keys from the host machine, allowing the container to authenticate with GitHub. +Uncomment the volumes section. + +Replace: +- `your_github_token_here` with your GitHub personal access token (with appropriate permissions) +- `your-email@example.com` with your Git email address + +This mounts your SSH keys from the host machine and sets the GitHub token and email as environment variables, allowing the container to authenticate with GitHub. The git configuration is handled automatically at runtime. ### Updating Specs diff --git a/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index f587e0f946..cf4f107e8e 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -259,6 +259,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND } if ($createRelease) { + Console::execute('git config --global user.email "$GIT_EMAIL"', stdin: '', stdout: '', stderr: ''); + $releaseVersion = $language['version']; $repoName = $language['gitUserName'] . '/' . $language['gitRepoName'];