Change how the agent's pull request bodies are laid out
Replaces the three values. revision is pull_request_revision as last read (0 when none was saved); a stale one is 409 REVISION_CONFLICT and nothing changes. A template the platform will not lay text around is 400 with reason_code template_too_large, template_not_utf8 or template_unsupported. A change reaches pull requests the agent's sessions open or update afterwards; text already on GitHub is not rewritten. Writes a set_agent_pull_request_settings receipt with the values before and after (a template as its size and hash, never its text); receipt_id is null when nothing changed. Agent managers with a web session only; API keys are refused.
Auth: cookie session only; no scope. Idempotency-Key: ignored.
cookieSession__Host-werft_session<token>For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.
id*stringThe agent's id.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidX-Requested-With?"werft-web"Required with a cookie session: the literal werft-web.
"werft-web"application/json- body
pull_request*revision*integer0 <= value <= 9007199254740991Stored; the values and their new revision.
application/json- response
pull_request*pull_request_revision*integer0 < value <= 9007199254740991receipt_id*|nullcurl -X PUT 'https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/github/pull-request' \ -H 'Content-Type: application/json' \ -d '{ "pull_request": { "formatting": "inherit", "template": null, "template_name": "feature.md" }, "revision": 0}'{ "pull_request": { "formatting": "inherit", "template": null, "template_name": "feature.md" }, "pull_request_revision": 1, "receipt_id": "c4a1e9d2-7b3f-4e8a-a6c5-1d2e3f4a5b6c"}