Preview Link in Code Review

Crafting sandboxes can be launched via a URL. This URL can be added to code review threads — such as GitHub Pull Requests — so that reviewers can click the link to start a sandbox for preview.

GitHub Action

For GitHub, the recommended approach is to use the Crafting Sandbox Launch Action to automatically inject the launch URL into a pull request.

URL Format

The URL can also be constructed directly:

https://sandboxes.cloud/create?template=frontend&ws_frontend_co_src_version=master&ws_frontend_mode=auto&dep_mysql_snapshot=mysql-snapshot&autolaunch=true

Replace sandboxes.cloud with the appropriate hostname for self-hosted Crafting deployments.

Supported Query Parameters

Parameter Description
template The template name for the target sandbox. If not provided, the first template is used.
flavor The flavor of the template. If not provided, the default flavor is used.
sandbox_name The name for the target sandbox. If not provided, a name prefixed with the username is generated. If an invalid name is specified, the sandbox may not be created automatically regardless of the autolaunch value.
ws_WORKSPACE_co_CHECKOUT_version Specifies the version (branch, commit, etc.) for a checkout in a workspace. Replace WORKSPACE with the workspace name and CHECKOUT with the checkout path.
ws_WORKSPACE_mode Specifies the auto-follow mode for a workspace. Replace WORKSPACE with the workspace name.
dep_DEPENDENCY_snapshot Specifies a snapshot for a dependency workload. Replace DEPENDENCY with the dependency name. The snapshot's service type must match the target.
container_CONTAINER_snapshot Specifies a snapshot for a container workload. Replace CONTAINER with the container name. The snapshot must match the container's volume configuration.
autolaunch true or false. When true, the sandbox is launched automatically. When false or omitted, the sandbox creation page is shown pre-populated with the provided values, allowing review before launching.
env_ENV_NAME Injects an environment variable into the launching sandbox.
repo Simplifies setup by matching any workspace checkout that uses the same repository, instead of using ws_WORKSPACE_* parameters. Normally used together with version_spec and mode.
version_spec Specifies the version for workspaces matched by the repo parameter. Must be used together with repo.
mode Specifies the auto-follow mode for workspaces matched by the repo parameter. Must be used together with repo.