Skip to main content
POST
/
{org}
/
{repo}
/
bookmark
/
merge
Merge bookmarks
curl --request POST \
  --url https://api.mesa.dev/v1/{org}/{repo}/bookmark/merge \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "target": "<string>",
  "source": "<string>",
  "delete_source": false,
  "strategy": "auto"
}
'
{
  "merge_type": "fast_forward",
  "commit_oid": "<string>",
  "change_id": "<string>",
  "target": "<string>",
  "source": "<string>",
  "source_deleted": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

org
string
required

Organization slug

Minimum string length: 1
repo
string
required

Repository name

Minimum string length: 1

Body

application/json
target
string
required

The bookmark being merged into. Usually main. This bookmark is updated to the resulting merge point.

Minimum string length: 1
source
string
required

The bookmark that has changes to merge into target.

Minimum string length: 1
delete_source
boolean
default:false

Whether to delete the source bookmark after a successful merge

strategy
enum<string>
default:auto

Merge strategy. auto: fast-forward when possible. merge_commit: always create a merge commit.

Available options:
auto,
merge_commit

Response

Merge result

merge_type
enum<string>
required

The type of merge that was performed

Available options:
fast_forward,
merge_commit,
no_op
commit_oid
string
required

The commit OID the target bookmark now points to

Pattern: ^[0-9a-f]{40}$
change_id
string
required

The JJ change ID the target bookmark points to after the merge.

Pattern: ^[zyxwvutsrqponmlk]{32}$
target
string
required

The target bookmark that was merged into

source
string
required

The source bookmark that was merged from

source_deleted
boolean
required

Whether the source bookmark was deleted after merge