API

PullRequestAction

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/organizations/{org_slug}/github/pull_requests/{github_repository_id}/{number}/actions create GitHub review response

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

created, err := client.PullRequestAction(nil).Create(map[string]any{"number": "example", "organization_id": "example", "pull_request_id": "example", "action_name": "example", "operation_key": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local created, err = client:PullRequestAction():create({ number = "example", organization_id = "example", pull_request_id = "example", action_name = "example", operation_key = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$created = $client->PullRequestAction()->create(["number" => "example", "organization_id" => "example", "pull_request_id" => "example", "action_name" => "example", "operation_key" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

created = client.PullRequestAction().create({ "number": "example", "organization_id": "example", "pull_request_id": "example", "action_name": "example", "operation_key": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

created = client.PullRequestAction.create({ "number" => "example", "organization_id" => "example", "pull_request_id" => "example", "action_name" => "example", "operation_key" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const created = await client.PullRequestAction().create({ number: "example", organization_id: "example", pull_request_id: "example", action_name: "example", operation_key: "example" })

Fields

Field Type Required Description
action_name string Yes Action Name
body string No Body
comment_id string No Comment Id
comments array No Comments
event string No Event
expected_head_sha string No Expected Head Sha
id one,string,null No Id
label string No Label
line integer No Line
node_id one,string,null No Node Id
operation_key string Yes Operation Key
path string No Path
run_id string No Run Id
side string No Side
start_line integer No Start Line
start_side string No Start Side
thread_id string No Thread Id

create

POST /api/v1/organizations/{org_slug}/github/pull_requests/{github_repository_id}/{number}/actions

Operation ID: post_api_v1_organizations_org_slug_github_pull_requests_github_repository_id_number_actions.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
github_repository_id path string Yes
number path string Yes

Request body

application/json

Property Type Required Description
action_name enum: comment, inline, reply, review, edit_comment, delete_comment, ... Yes
body string No
comment_id string No
comments array of object No
comments[].body string Yes
comments[].line integer Yes
comments[].path string Yes
comments[].side enum: LEFT, RIGHT Yes
event enum: COMMENT, APPROVE, REQUEST_CHANGES No
expected_head_sha string No
label string No
line integer No
operation_key string Yes
path string No
run_id string No
side enum: LEFT, RIGHT No
start_line integer No
start_side string No
thread_id string No

Responses

200: GitHub review response

application/json

Property Type Required Description
error string Yes
result object Yes
result.id string No
result.node_id string No
status enum: pending, sent, failed, unknown Yes
202: GitHub review response

application/json

Property Type Required Description
error string Yes
result object Yes
result.id string No
result.node_id string No
status enum: pending, sent, failed, unknown Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway