const file = await mesa.content.get({
repo: "agent-workspace",
path: "README.md",
});
console.log(file.content);
const bookmarks = await mesa.bookmarks.list({ repo: "agent-workspace" });
const featureBookmark = bookmarks.bookmarks.find((bookmark) => bookmark.name === "feature/readme")!;
const change = await mesa.changes.create({
repo: "agent-workspace",
base_change_id: featureBookmark.change_id,
message: "Update README",
author: { name: "Mesa Bot", email: "[email protected]" },
files: [
{
path: "README.md",
action: "upsert",
content: Buffer.from("...").toString("base64"),
encoding: "base64",
},
],
});
await mesa.bookmarks.move({
repo: "agent-workspace",
bookmark: "feature/readme",
change_id: change.id,
});