Skip to main content
Merge source into target. The target bookmark advances to the merge result. Required scope: write
result = await mesa.bookmarks.merge(
    repo="app",
    source="feature-x",
    target="main",
    delete_source=True,
)
print(result.merge_type, result.change_id)
Resolve conflicts on retry:
from mesa_sdk import WholeFileResolution

result = await mesa.bookmarks.merge(
    repo="app",
    source="feature-x",
    target="main",
    resolutions=[WholeFileResolution(path="README.md", take="source")],
)

Options

repo
str
required
Repository name.
source
str
required
Source bookmark with changes to merge.
target
str
required
Target bookmark to advance.
delete_source
bool | None
Delete the source bookmark after a successful merge.
allow_conflicted
bool | None
When True, accept a merge that still contains textual conflicts. When omitted or False, conflicted merges fail with ConflictError.
resolutions
list[Resolution] | None
Whole-file or per-hunk conflict resolutions applied before conflict detection.
org
str | None
Organization override.

Response

merge_type
'merge_commit' | 'no_op'
Type of merge that was performed.
is_conflicted
bool
Whether the resulting merge change still contains unresolved conflicts.
commit_oid
str
Commit OID the target bookmark now points to.
change_id
str
Change ID the target bookmark points to after the merge.
target
str
Bookmark that was merged into.
source
str
Bookmark that was merged from.
source_deleted
bool
Whether the source bookmark was deleted after the merge.