Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mesa.dev/llms.txt

Use this file to discover all available pages before exploring further.

Enqueue a sync for a repository that has an upstream remote. Required scope: write
sync = await mesa.repos.sync_upstream(repo="app", direction="pull")
print(sync.id, sync.status)

Options

repo
str
required
Repository name.
direction
'pull' | 'push'
required
pull fetches from upstream into Mesa. push sends Mesa refs to upstream.
org
str | None
Organization override.

Response

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

SyncRunStats

refs
list[SyncRunRef]
Per-ref sync outcomes.

SyncRunRef

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