v5

latestSwagger 2.0MIT2026-08-03485217850.7 KB
repository

List a repo's pull requests

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

Path parameters

ownerstring required

owner of the repo

repostring required

Name of the repo

Query parameters

base_branchstring

Filter by target base branch of the pull request

state'open' | 'closed' | 'all'

State of pull request

sort'oldest' | 'recentupdate' | 'recentclose' | 'leastupdate' | 'mostcomment' | 'leastcomment' | 'priority'

Type of sort

milestoneinteger

ID of the milestone

labelsinteger[]

Label IDs

posterstring

Filter by pull request author

pageinteger

Page number of results to return (1-based)

limitinteger

Page size of results

Response

PullRequestList

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