v5

latestSwagger 2.0MIT2026-08-03485217850.7 KB
repository

Get a pull request

get/repos/{owner}/{repo}/pulls/{index}

Path parameters

ownerstring required

owner of the repo

repostring required

name of the repo

indexinteger required

index of the pull request to get

Response

PullRequest

additionsinteger

The number of lines added in the pull request

allow_maintainer_editboolean

Whether maintainers can edit the pull request

bodystring

The description body of the pull request

changed_filesinteger

The number of files changed in the pull request

closed_atstring date-time
commentsinteger

The number of comments on the pull request

content_versioninteger

The version of the pull request content for optimistic locking

created_atstring date-time
deletionsinteger

The number of lines deleted in the pull request

diff_urlstring

The URL to download the diff patch

draftboolean

Whether the pull request is a draft

due_datestring date-time
html_urlstring

The HTML URL to view the pull request

idinteger

The unique identifier of the pull request

is_lockedboolean

Whether the pull request conversation is locked

merge_basestring

The merge base commit SHA

merge_commit_shastring

The SHA of the merge commit

mergeableboolean

Whether the pull request can be merged

mergedboolean

Whether the pull request has been merged

merged_atstring date-time
numberinteger

The pull request number

patch_urlstring

The URL to download the patch file

pin_orderinteger

The pin order for the pull request

review_commentsinteger

number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR)

state'open' | 'closed'

The current state of the pull request

titlestring

The title of the pull request

updated_atstring date-time
urlstring

The API URL of the pull request