Skip to content

gitpublish module route (requires gitpublish:merge:admin)

POST
/v1/m/gitpublish/targets/{id}/merges
curl --request POST \
--url https://example.com/v1/m/gitpublish/targets/example/merges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "acknowledge_intent": "example", "expected_base": "example", "expected_head": "example", "expected_result_tree": "example", "method": "merge", "number": 1, "operation_id": "example" }'

Merges one pull request only while its head is still the reviewed expected_head, and returns the publication intent with the merge commit and tree it recorded.

id
required
string

Path parameter id.

X-Olivares-Tenant
string format: uuid

Target tenant id; required when the principal can act in more than one tenant.

The handler decodes one strict JSON document, bounded at 1 MiB; an unknown field is field_not_accepted.

Media type application/json
object
acknowledge_intent
string
expected_base

Unsupported: refused with unsupported_requirement.

string
expected_head
required

The reviewed source head; the host refuses the merge if the head differs.

string
/^[0-9a-f]{40}([0-9a-f]{24})?$/
expected_result_tree

Unsupported: refused with unsupported_requirement.

string
method
required

Rebase is refused as unsupported_requirement on a GitLab target.

string
Allowed values: merge squash rebase
number
required
integer
>= 1
operation_id
required

Client idempotency key.

string
/^[A-Za-z0-9._:-]{1,128}$/

OK

Media type application/json
object
Example generated
{}

Bad request

Media type application/json
object
Example generated
{}

Unauthenticated

Media type application/json
object
Example generated
{}

Forbidden

Media type application/json
object
Example generated
{}

Not found

Media type application/json
object
Example generated
{}

Conflict / setup required

Media type application/json
object
Example generated
{}

Rate limited

Media type application/json
object
Example generated
{}