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 new change, optionally applying initial file operations atomically. File content must be base64-encoded.
import base64
from mesa_sdk import Author, FileDelete, FileUpsert

change = await mesa.changes.create(
    repo="app",
    base_change_id="zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
    message="Add README",
    author=Author(name="Docs Bot", email="docs@example.com"),
    files=[
        FileUpsert(
            path="README.md",
            content=base64.b64encode(b"# App\n").decode(),
        ),
        FileDelete(path="old.txt"),
    ],
)

Options

repo
str
required
Repository name.
base_change_id
str
required
Change to create the new change on top of. Use Mesa’s virtual root change ID for the first change in an empty repository.
org
str | None
Organization override.
message
str | None
Change message.
author
Author | None
Commit author identity. When omitted, the server fills an identity derived from the API key.
committer
Author | None
Committer identity. When omitted, the server falls back to author.
files
list[FileChange] | None
File operations to apply atomically. Entries are FileUpsert or FileDelete.

Response

Returns a change object with id, current_commit_oid, is_conflicted, message, author, committer, parents, created_at, and updated_at.

Required scope

write