Preview Merge
Preview merge conflicts without creating commits, updating refs, or touching a working tree. When requested, conflict content is rendered from Git objects produced in request-local scratch storage.
JWT claims
Required scopes: git:read
Requires per repo scope: Yes
Deprecated: Use /api/repos/{repo_name}/merge/preview instead.
Authorizations
JWT bearer token signed with your organization's registered signing key. There is no OAuth authorization server; you mint tokens yourself and the token's scopes claim carries the granted permission scopes. Public scopes: git:read (read repository contents), git:write (write branches, commits, tags, and notes), repo:write (create and manage repositories), org:read (list an organization's repositories). Each operation's security requirement names the scopes it requires. See https://code.storage/docs/getting-started/authentication for how to mint tokens.
Query Parameters
Source branch to merge from.
Destination branch to preview merging into.
Whether source_branch should be resolved from the ephemeral namespace.
Whether target_branch should be resolved from the ephemeral namespace.
When true, include bounded conflict content in the response.
Response
Merge preview result. Conflicted previews return HTTP 200 with status=conflicted; request and storage failures use normal HTTP errors.
Read-only merge preview result, including clean or conflicted status and optional inline conflict content.
Repository paths that conflicted during the merge preview.
Inline conflict content, populated only when include_content=true.
Operation result if applied: merge_commit, fast_forward, or no_op.
merge_commit, fast_forward, no_op "merge_commit"
Source branch requested by the caller.
"feature/preview"
Resolved source branch tip SHA.
"9eb378bdb5bf1944f6ba0bd5a2c4df3ce32f4df1"
Preview status: clean or conflicted.
clean, conflicted "conflicted"
Target branch requested by the caller.
"main"
Resolved target branch tip SHA.
"c4f0fdfc41adab56630b34f5f4fd4e84a2c5b4d2"
Conflicts omitted from inline content because of request or server limits.
Merge base SHA used for the preview.
"a2d127e6a4d54bb7390de828a99e36411f0c84df"