const file = await mesa.content.get({
repo: 'my-workspace',
path: 'README.md',
});
const featureBookmark = await mesa.bookmarks
.list({ repo: 'my-workspace' })
.find((bookmark) => bookmark.name === 'my-feature')!;
const change = await mesa.changes.create({
repo: 'my-workspace',
base_change_id: featureBookmark.change_id,
message: 'Update README',
author: { name: 'My AI Agent', email: 'agent@acme.dev' },
files: [
{
path: 'README.md',
action: 'upsert',
content: Buffer.from('...').toString('base64'),
encoding: 'base64',
},
],
});
await mesa.bookmarks.move({
repo: 'my-workspace',
bookmark: 'feature/readme',
change_id: change.id,
});