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

ParameterDescription
templateThe template name for the target sandbox. If not provided, the first template is used.
flavorThe flavor of the template. If not provided, the default flavor is used.
sandbox_nameThe 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_versionSpecifies 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_modeSpecifies the auto-follow mode for a workspace. Replace WORKSPACE with the workspace name.
dep_DEPENDENCY_snapshotSpecifies a snapshot for a dependency workload. Replace DEPENDENCY with the dependency name. The snapshot's service type must match the target.
container_CONTAINER_snapshotSpecifies a snapshot for a container workload. Replace CONTAINER with the container name. The snapshot must match the container's volume configuration.
autolaunchtrue 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_NAMEInjects an environment variable into the launching sandbox.
repoSimplifies 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_specSpecifies the version for workspaces matched by the repo parameter. Must be used together with repo.
modeSpecifies the auto-follow mode for workspaces matched by the repo parameter. Must be used together with repo.