Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

@agents-git-bot agents-git-bot bot commented Jan 2, 2026

Documentation Sync for PR #326

Syncs documentation for the new depth parameter in gitCheckout() method from cloudflare/sandbox-sdk#326.

Changes

Files API Reference (/sandbox/api/files/)

  • Added detailed description of depth parameter (positive integer for shallow clones)
  • Documented return type GitCheckoutResult with all fields
  • Added comprehensive examples:
    • Basic clone
    • Branch-specific clone
    • Shallow clone with depth: 1 using realistic repo (torvalds/linux)
    • Combined options (branch + depth + targetDir) using facebook/react
  • Added validation note explaining that depth must be positive integer

Git Workflows Guide (/sandbox/guides/git-workflows/)

  • Updated clone examples with realistic large repositories (linux kernel, react)
  • Added inline comments explaining depth: 1 clones only latest commit
  • Added example combining multiple options
  • Enhanced best practices section with guidance on when to use shallow clones and different depth values

Benefits

This documentation helps users:

  • Understand how to use shallow clones to reduce bandwidth and speed up cloning
  • See validation rules (positive integers only)
  • Learn when to use depth: 1 vs higher values
  • Use realistic examples with well-known large repositories

Related SDK PR: cloudflare/sandbox-sdk#326

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/sandbox/ @whoiskatrin, @ghostwriternr, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents

Add comprehensive documentation for the new depth parameter in gitCheckout():
- Enhanced Files API reference with detailed parameter description, return type, and validation rules
- Added examples showing shallow clones with depth: 1 for latest commit only
- Added example combining branch, depth, and targetDir options
- Updated git-workflows guide with realistic repository examples (linux kernel, react)
- Enhanced best practices section with guidance on when to use shallow clones

Synced from cloudflare/sandbox-sdk PR #326
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants