Skip to content

gitpublish module route (requires gitpublish:pull_request:write)

POST
/v1/m/gitpublish/targets/{id}/pull-requests
curl --request POST \
--url https://example.com/v1/m/gitpublish/targets/example/pull-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "acknowledge_intent": "example", "base": "example", "body": "example", "commit": "example", "draft": true, "head_ref": "example", "operation_id": "example", "title": "example" }'

Opens a pull request from a branch under the target’s push prefix into an allowed merge base, or adopts the matching open one, and returns the publication intent with its receipt.

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
base
required

An allowed merge base.

string
/^[A-Za-z0-9._/-]+$/
body
string
<= 65536 characters
commit
required

The requested head commit, recorded beside the observed one.

string
/^[0-9a-f]{40}([0-9a-f]{24})?$/
draft
boolean
head_ref
required

Source branch under push_prefix; the host binds branches, not SHAs.

string
/^[A-Za-z0-9._/-]+$/
operation_id
required

Client idempotency key.

string
/^[A-Za-z0-9._:-]{1,128}$/
title
required
string
<= 256 characters
Example generated
{
"acknowledge_intent": "example",
"base": "example",
"body": "example",
"commit": "example",
"draft": true,
"head_ref": "example",
"operation_id": "example",
"title": "example"
}

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
{}