Skip to content

chore: extract branch from download of examples#16

Merged
levivannoort merged 2 commits into
mainfrom
fix-issues-around-build
Jun 11, 2026
Merged

chore: extract branch from download of examples#16
levivannoort merged 2 commits into
mainfrom
fix-issues-around-build

Conversation

@levivannoort

Copy link
Copy Markdown
Member

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

@greptile-apps

greptile-apps Bot commented Jun 11, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes the downloadExamples function to always fetch from the main branch of appwrite/appwrite (since version-pinned example folders only exist there), while still using appwriteExamplesBranch as the subdirectory path. It also adds a CI workflow that validates the build and content-download steps on every PR targeting main.

  • scripts/download-content.ts: Introduces a local ref = "main" constant with an explanatory comment, and updates the giget call to use it instead of the version string as the git ref; the "branch" label in the log is corrected to "version".
  • .github/workflows/ci.yml: New workflow that checks out the repo, installs dependencies, runs bun run build, and executes bun run download-content on each pull request.

Confidence Score: 5/5

Safe to merge — the change correctly decouples the git ref from the version string, and the CI workflow is straightforward.

The core logic fix is well-reasoned and accompanied by an explanatory comment. The CI workflow uses up-to-date action versions and mirrors the existing local workflow. No correctness issues are present in the changed code.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/ci.yml New CI workflow that runs build and download-content on every PR targeting main; uses actions/checkout@v6 (latest), setup-bun@v2, and explicit patch-package step alongside the postinstall hook
scripts/download-content.ts Decouples git ref from version string — ref is now hardcoded to "main" with an explanatory comment; console.log label updated from "branch" to "version"; logic is correct

Reviews (2): Last reviewed commit: "ci: validate build and content download ..." | Re-trigger Greptile

Add a CI workflow that runs on pull_request to main, mirroring the
Dockerfile's setup (bun install, patch-package) and running
bun run build + bun run download-content. This catches build and
download-content regressions before merge instead of only at the
staging Docker build. init-vector-store is skipped to avoid OpenAI
cost on every PR.

Also relabel the examples download log from 'branch' to 'version',
since the value is now the version subdirectory and the git ref is
always main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@levivannoort levivannoort merged commit 89195f9 into main Jun 11, 2026
2 checks passed
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.

2 participants