API

GithubPullRequest

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/refresh create Success
GET /api/v1/organizations/{org_slug}/github/pull_requests/{github_repository_id}/{number} load 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:

github_pull_request, err := client.GithubPullRequest(nil).Load(map[string]any{"id": "example_id", "organization_id": "example", "pull_request_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(github_pull_request)

Lua

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

local github_pull_request, err = client:GithubPullRequest():load({ id = "example_id", organization_id = "example", pull_request_id = "example" })

PHP

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

$github_pull_request = $client->GithubPullRequest()->load(["id" => "example_id", "organization_id" => "example", "pull_request_id" => "example"]);

Python

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

github_pull_request = client.GithubPullRequest().load({"id": "example_id", "organization_id": "example", "pull_request_id": "example"})

Ruby

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

github_pull_request = client.GithubPullRequest.load({ "id" => "example_id", "organization_id" => "example", "pull_request_id" => "example" })

TypeScript

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

const github_pull_request = await client.GithubPullRequest().load({ id: "example_id", organization_id: "example", pull_request_id: "example" })

Fields

Field Type Required Description
capabilities object Yes Capabilities
content object Yes Content
fetched_at string Yes Fetched At
id string No Id
magic_merge one,object,null Yes Magic Merge
pull_request any Yes Pull Request
stack object Yes Stack
transcript_paths array Yes Transcript Paths

create

POST /api/v1/organizations/{org_slug}/github/pull_requests/refresh

Operation ID: api_v1_github_pull_requests_refresh.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

202: GitHub review response

application/json

Property Type Required Description
status string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/organizations/{org_slug}/github/pull_requests/{github_repository_id}/{number}

Operation ID: get_api_v1_organizations_org_slug_github_pull_requests_github_repository_id_number_.

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
section query string No
page query integer No
cursor query string No
thread_id query string No
check_id query string No
run_id query string No
job_id query string No

Responses

200: GitHub review response

application/json

Property Type Required Description
capabilities object Yes
capabilities.identity string Yes
capabilities.write boolean Yes
content object Yes
content.check_id string No
content.entries array of object Yes
content.entries[].additions integer No
content.entries[].author object No
content.entries[].author.avatar_url string No
content.entries[].author.id string No
content.entries[].author.login string Yes
content.entries[].body string No
content.entries[].can_cancel boolean No
content.entries[].can_delete boolean No
content.entries[].can_edit boolean No
content.entries[].can_rerun boolean No
content.entries[].check_id string No
content.entries[].children array of object No
content.entries[].created_at string No
content.entries[].deletions integer No
content.entries[].id string Yes
content.entries[].job_id string No
content.entries[].kind string Yes
content.entries[].line integer No
content.entries[].log string No
content.entries[].next_cursor string No
content.entries[].node_id string No
content.entries[].outdated boolean No
content.entries[].parent_id string No
content.entries[].partial boolean No
content.entries[].patch string No
content.entries[].path string No
content.entries[].previous_path string No
content.entries[].reactions array of string No
content.entries[].resolved boolean No
content.entries[].run_id string No
content.entries[].sha string No
content.entries[].side string No
content.entries[].start_line integer No
content.entries[].state string No
content.entries[].title string No
content.entries[].updated_at string No
content.job_id string No
content.next_cursor string Yes
content.next_page integer Yes
content.partial boolean Yes
content.run_id string No
content.section string Yes
content.thread_id string No
fetched_at string Yes
magic_merge object Yes
magic_merge.base_sha string Yes
magic_merge.can_apply_merge boolean Yes
magic_merge.can_apply_rebase boolean Yes
magic_merge.can_resolve_merge boolean Yes
magic_merge.can_resolve_rebase boolean Yes
magic_merge.head_sha string Yes
magic_merge.merge object Yes
magic_merge.merge.applied_at string No
magic_merge.merge.apply_reason string No
magic_merge.merge.apply_status string No
magic_merge.merge.assessed_at string No
magic_merge.merge.classification array of object No
magic_merge.merge.commits array of object No
magic_merge.merge.commits[].conflict_paths array of string Yes
magic_merge.merge.commits[].original_sha string Yes
magic_merge.merge.commits[].rewritten_sha string Yes
magic_merge.merge.conflict_paths array of string No
magic_merge.merge.merge_base_sha string No
magic_merge.merge.reason string No
magic_merge.merge.resolution_decisions array of object No
magic_merge.merge.resolution_ref string No
magic_merge.merge.status string Yes
magic_merge.merge.tip_sha string No
magic_merge.observed_at string Yes
magic_merge.open boolean Yes
magic_merge.prior_attempts array of object Yes
magic_merge.prior_attempts[].assessed_at string Yes
magic_merge.prior_attempts[].base_sha string Yes
magic_merge.prior_attempts[].head_sha string Yes
magic_merge.prior_attempts[].mode string Yes
magic_merge.prior_attempts[].status string Yes
magic_merge.rebase object Yes
magic_merge.rebase.applied_at string No
magic_merge.rebase.apply_reason string No
magic_merge.rebase.apply_status string No
magic_merge.rebase.assessed_at string No
magic_merge.rebase.classification array of object No
magic_merge.rebase.commits array of object No
magic_merge.rebase.commits[].conflict_paths array of string Yes
magic_merge.rebase.commits[].original_sha string Yes
magic_merge.rebase.commits[].rewritten_sha string Yes
magic_merge.rebase.conflict_paths array of string No
magic_merge.rebase.merge_base_sha string No
magic_merge.rebase.reason string No
magic_merge.rebase.resolution_decisions array of object No
magic_merge.rebase.resolution_ref string No
magic_merge.rebase.status string Yes
magic_merge.rebase.tip_sha string No
magic_merge.rebase_application_status string Yes
pull_request object and object Yes
stack object Yes
stack.stacks array of object Yes
stack.stacks[].base_branch string Yes
stack.stacks[].entries array of object Yes
stack.stacks[].entries[].current boolean Yes
stack.stacks[].entries[].draft boolean Yes
stack.stacks[].entries[].number integer Yes
stack.stacks[].entries[].path string Yes
stack.stacks[].entries[].source string Yes
stack.stacks[].entries[].state string Yes
stack.stacks[].entries[].title string Yes
stack.stacks[].number integer Yes
stack.status enum: available, unavailable Yes
transcript_paths array of object Yes
transcript_paths[].label string Yes
transcript_paths[].path string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway