expectedTargetSha when you want an optimistic concurrency check before updating the target branch.
Options
Source branch name to merge from.
Set to
true when the source branch lives in the ephemeral namespace.Target branch name to merge into.
Set to
true when the target branch lives in the ephemeral namespace.Merge strategy. Must be one of
merge, ff_only, or ff_prefer.Commit SHA that must match the current target tip before the merge is applied.
Optional merge commit message. Used when the backend creates a merge commit.
Optional commit identity with
name and email. Required together when provided.Optional committer identity with
name and email. Required together when provided.Set to
true to allow merging branches without a shared history.Collapse the source into a single new commit whose only parent is the current target tip. Incompatible with the
ff_only strategy.Ordered per-ref policy rules (
{ pattern, ops? }) embedded in the per-call JWT. First match wins, evaluated against the target ref. Python: ref_policies. Go: RefPolicies with type storage.RefPolicyList. See the Branch Protection guide.Response
Merge outcome:
merge_commit, fast_forward, no_op, or unknown. The Python and Go SDKs also surface squash. The TypeScript SDK normalizes squash to merge_commit for semver compatibility.Commit SHA reported for the merge result.
Tree SHA for the resulting commit.
Source ref metadata with
branch, ephemeral, and sha.Target ref metadata with
branch, ephemeral, and oldSha/old_sha plus newSha/new_sha.Merge base SHA when the backend reports one.
Number of commits promoted onto the target branch.
Errors
Merge conflicts are surfaced asApiError/APIError. The raw error body is preserved, so conflict responses can still expose backend fields such as conflict_paths and merge_base_sha for callers that need them.