v5

latestSwagger 2.0MIT2026-08-03485217850.7 KB
repository

Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.

patch/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 edit

Request body

allow_maintainer_editboolean

Whether to allow maintainer edits

assigneestring

The new primary assignee username

assigneesstring[]

The new list of assignee usernames

basestring

The new base branch for the pull request

bodystring

The new description body for the pull request

content_versioninteger

The current version of the pull request content to detect conflicts during editing

due_datestring date-time
labelsinteger[]

The new list of label IDs for the pull request

milestoneinteger

The new milestone ID for the pull request

statestring

The new state for the pull request

titlestring

The new title for the pull request

unset_due_dateboolean

Whether to remove the current deadline

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