baseIsEphemeral/targetIsEphemeral to work with ephemeral refs. The method returns the API
message plus the resolved branch metadata so you can confirm creation before pushing commits.
Let the server name an ephemeral branch
Omit the target branch to let Code Storage allocate a name.Options
Source branch name, full
refs/heads/* ref, full refs/tags/* ref, or full commit SHA. Python:
base_ref. Go: BaseRef.Deprecated. Use
baseRef instead. A call must include this option or baseRef. When you send
both options, baseRef takes precedence. Python: base_branch. Go: BaseBranch.400.
Optional destination branch name. Omit it to let the server allocate a name. It can match the
source branch name when you move between namespaces.
true resolves a branch from the ephemeral namespace. It rejects a tag ref and does not change a
full SHA. With the default false, the API rejects all refs/namespaces/* refs, including
ephemeral refs.Ordered ref policy rules (
{ pattern, ops? }) in the JWT for this call. Code Storage uses the first rule that matches the target ref. Python: ref_policies. Go: RefPolicies with type storage.RefPolicyList. See Ref Policies.