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.

Create a repository in the current or specified organization.
repo = await mesa.repos.create(name="app")
print(repo.name)
print(repo.head_change_id)
Create with an upstream Git remote:
from mesa_sdk.types import TokenAuth, UpstreamConfig

repo = await mesa.repos.create(
    name="app",
    default_bookmark="main",
    upstream=UpstreamConfig(
        url="https://github.com/acme/app.git",
        auth=TokenAuth(token="github_pat_...", token_username="bot"),
    ),
)

Options

org
str | None
Organization override.
name
str | None
Repository name. If omitted, the API generates a name.
default_bookmark
str | None
Default bookmark name. Defaults to main when omitted.
upstream
UpstreamConfig | None
Optional upstream Git remote to attach at create time. On create, auth=UNSET and auth=None both create a public upstream. Pass TokenAuth or UsernamePasswordAuth to store credentials.

Response

id
str
Stable repository ID. Use this for scoped API keys and webhook target filters.
org
str
Organization slug.
name
str
Repository name used in SDK calls and filesystem paths.
default_bookmark
str
Default bookmark for the repository.
head_change_id
str
Current change ID at the default bookmark tip. Empty repositories return Mesa’s virtual root change ID.
upstream
object | None
Upstream summary with url and auth_kind, or None when no upstream is configured. Secret auth payloads are never returned.
created_at
datetime
Creation timestamp.
tags
dict[str, str]
Repository tags.

Required scope

write