Skip to main content
Merge source into target and move target to the merge result. Required scope: write
const result = await mesa.bookmarks.merge({
  repo: 'app',
  target: 'main',
  source: 'feature/auth',
  delete_source: true,
});

console.log(result.merge_type, result.change_id);
Resolve conflicts by retrying with resolutions:
await mesa.bookmarks.merge({
  repo: 'app',
  target: 'main',
  source: 'feature/auth',
  resolutions: [{ path: 'README.md', take: 'source' }],
});

Options

repo
string
required
Repository name.
target
string
required
Bookmark being merged into. This bookmark is updated to the merge result.
source
string
required
Bookmark being merged from.
org
string | undefined
Organization override.
delete_source
boolean | undefined
Delete the source bookmark after a successful merge. Defaults to false.
allow_conflicted
boolean | undefined
Persist a conflicted merge commit instead of rejecting with MERGE_CONFLICT. Defaults to false.
resolutions
array | undefined
Conflict resolutions to apply before conflict detection. Each resolution targets a path and either supplies whole-file content, takes target or source, or resolves individual hunks.

Response

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