v5

latestSwagger 2.0MIT2026-08-03485217850.7 KB
repository

Create a pull request

post/repos/{owner}/{repo}/pulls

Path parameters

ownerstring required

owner of the repo

repostring required

name of the repo

Request body

allow_maintainer_editboolean

Whether maintainers can edit the pull request

assigneestring

The primary assignee username

assigneesstring[]

The list of assignee usernames

basestring

The base branch for the pull request

bodystring

The description body of the pull request

due_datestring date-time
headstring

The head branch for the pull request, it could be a branch name on the base repository or a form like <username>:<branch> which refers to the user's fork repository's branch.

labelsinteger[]

The list of label IDs to assign to the pull request

milestoneinteger

The milestone ID to assign to the pull request

reviewersstring[]

The list of reviewer usernames

team_reviewersstring[]

The list of team reviewer names

titlestring

The title of the pull request

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