agentRunner

Open a pull request from an agent run

Queues a pull request for the run's diff (result_diff). The pull request is created in the background, so pr_url is usually not set yet in the response: pr_is_being_created is true until it finishes. Poll getAgentRunner until pr_url or pr_error is set. Returns 409 if a pull request already exists or is being created, and 422 if the run has no diff, no branch, no GitHub repository or installation, or needs a git sync.

post/agent_runners/{agent_runner_id}/pull_request

Request

  • Base URL
    https://api.netlify.com/api/v1
  • URL
    https://api.netlify.com/api/v1/agent_runners/{agent_runner_id}/pull_request
  • Auth
    OAuth 2
    Implicit: https://app.netlify.com/authorize

Response

OK

idstring
site_idstring
parent_agent_runner_idstring
statestring

One of new, running, await_input, interrupted, error, done, cancelled or archived.

created_atstring dateTime
updated_atstring dateTime
done_atstring dateTime
titlestring
branchstring
result_branchstring
pr_urlstring
pr_branchstring
pr_statestring

One of open, draft, merged or closed.

pr_numberinteger
pr_is_being_createdboolean
pr_errorstring
current_taskstring

What the agent is working on in the active session.

result_diffstring
shastring
merge_commit_shastring
merge_commit_errorstring
merge_commit_is_being_createdboolean
base_deploy_idstring
attached_file_keysstring[]
active_session_created_atstring dateTime
has_result_diffboolean

Whether the run has changes, available from GET /agent_runners/{agent_runner_id}/diff.

latest_session_deploy_idstring
latest_session_deploy_urlstring
preview_statestring

State of the deploy building the latest preview. Null until that deploy exists; ready once the preview is live.

Changes

No recorded changes to this operation across all 65 revisions of this API.