Skip to main content
GET
Get branch pull request

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.

Path Parameters

app_id
string
required

ID of the app.

Query Parameters

branch_id
string

ID of the branch to work on, as returned by List branches. Omit it to work on the app's main branch.

Response

BranchPullRequest · object | null

The branch's pull request, or null.

The branch's pull request, or null when it has none.

number
integer
required

Pull request number on GitHub.

Example:

42

title
string
required

Title of the pull request.

Example:

"Add checkout flow"

body
string | null
required

Description of the pull request, or null.

Example:

"Adds a checkout page."

state
enum<string>
required

open, or closed once merged or closed.

Available options:
open,
closed
Example:

"open"

merged
boolean
required

Whether it was merged.

Example:

false

draft
boolean
required

Whether it's a draft.

Example:

false

html_url
string
required

Link to the pull request on GitHub.

Example:

"https://github.com/acme/shop/pull/42"

changed_files
integer
required

Number of files it changes.

Example:

3

additions
integer
required

Lines added.

Example:

120

deletions
integer
required

Lines removed.

Example:

8

head
GitRef · object
required

The branch the pull request merges from.

base
GitRef · object
required

The branch it merges into.

readiness
PullRequestReadiness · object | null
required

Whether it's ready to merge, or null when GitHub hasn't reported it yet.