Skip to main content
Enqueue a sync for a repository that has an upstream remote. Required scope: write

Options

str
required
Repository name.
'pull' | 'push'
required
pull fetches from upstream into Mesa. push sends Mesa branches and tags to upstream.
dict | None
Branch and tag glob filters for this sync. Omit this field to sync all supported branches and tags. If provided, include at least one of branches or tags.
str
Glob matched against upstream branch names, such as main, release/*, or *. Omit or use an empty string to match no branches. Do not include refs/heads/.
str
Glob matched against upstream tag names, such as v1.* or *. Omit or use an empty string to match no tags. Do not include refs/tags/.

Response

str
Sync ID.
str
Repository ID.
'pull' | 'push'
Sync direction.
'queued' | 'in_progress' | 'completed' | 'failed'
Current sync status.
int
Attempt number for this run.
SyncRefGlobs
Branch and tag glob filters for this run.
SyncRunStats | None
Per-ref sync stats, or null until the run reaches a terminal state.
str | None
Failure message, or null when no error is present.
datetime
Creation time.
datetime | None
Start time, or null if the run has not started.
datetime | None
Finish time, or null if the run has not finished.

SyncRefGlobs

str
Branch-name glob for this sync.
str
Tag-name glob for this sync.

SyncRunStats

list[SyncRunRef]
Per-ref sync outcomes. This contains only source refs that matched ref_globs.

SyncRunRef

str
Git ref name.
str | None
Previous OID, or null when the ref was newly created.
str
OID after the sync attempt.
'updated' | 'unchanged' | 'filtered' | 'rejected'
Result for this ref.