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.

Update fields on a repository. Omitted keyword arguments are left unchanged.
repo = await mesa.repos.update(
    repo="app",
    name="renamed-app",
    default_bookmark="main",
)
Update upstream credentials without changing other repository fields:
from mesa_sdk.types import TokenAuth, UpstreamConfig

repo = await mesa.repos.update(
    repo="app",
    upstream=UpstreamConfig(
        url="https://github.com/acme/app.git",
        auth=TokenAuth(token="github_pat_..."),
    ),
)

Options

repo
str
required
Repository name to update.
org
str | None
Organization override.
name
str | None
New repository name.
default_bookmark
str | None
New default bookmark name.
upstream
UpstreamConfig | None | Unset
Omit to leave upstream unchanged. Pass None to remove the upstream entirely. Pass UpstreamConfig to set or replace the upstream URL.

Upstream auth tri-state

UpstreamConfig.auth has different meanings on update:
ValueBehavior
omitted / UNSETPreserve the existing stored credential while updating the URL.
NoneClear the stored credential and make the upstream public.
TokenAuth or UsernamePasswordAuthReplace the stored credential.

Response

Returns the updated repository object with id, org, name, default_bookmark, head_change_id, upstream, created_at, and tags.

Required scope

write
The REST API supports repository tag updates. The current high-level Python method does not expose tags; use mesa.raw for tag mutation until that wrapper exists.