Adds an inline diff comment to this pull request.
POST /repos/{owner}/{repo}/pulls/{pull_number}/comments
Comment data. body, commit_id, and path are required.
Optionalsignal: AbortSignalThe created review comment
Fetches the commits included in this pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/commits
Optionalparams: PaginationParamsOptional pagination: per_page, page
Optionalsignal: AbortSignalA paged response of commits
Submits a review on this pull request.
POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews
Review data. event is required ('APPROVE', 'REQUEST_CHANGES', 'COMMENT').
Optionalsignal: AbortSignalThe submitted review
Fetches the files changed by this pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/files
Optionalparams: PaginationParamsOptional pagination: per_page, page
Optionalsignal: AbortSignalA paged response of changed files
Fetches the pull request details.
GET /repos/{owner}/{repo}/pulls/{pull_number}
Optionalsignal: AbortSignalThe pull request object
Checks whether the pull request has been merged.
GET /repos/{owner}/{repo}/pulls/{pull_number}/merge
Optionalsignal: AbortSignaltrue if merged (HTTP 204), false if not merged (HTTP 404)
Merges the pull request.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge
Optionaldata: MergeDataOptional merge options: commit_title, commit_message, sha, merge_method
Optionalsignal: AbortSignalThe merge result with SHA and confirmation message
Requests reviewers for this pull request.
POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers
Object with reviewers (logins) and/or team_reviewers (slugs)
Optionalsignal: AbortSignalThe updated pull request
Fetches the inline review comments on this pull request's diff.
GET /repos/{owner}/{repo}/pulls/{pull_number}/comments
Optionalparams: ReviewCommentsParamsOptional filters: sort, direction, since, per_page, page
Optionalsignal: AbortSignalA paged response of review comments
Fetches the reviews submitted on this pull request.
GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews
Optionalparams: PaginationParamsOptional pagination: per_page, page
Optionalsignal: AbortSignalA paged response of reviews
Allows the resource to be awaited directly, resolving with the pull request info. Delegates to PullRequestResource.get.
Optionalonfulfilled: null | (value: GitHubPullRequest) => TResult1 | PromiseLike<TResult1>Optionalonrejected: null | (reason: unknown) => TResult2 | PromiseLike<TResult2>Updates this pull request's metadata.
PATCH /repos/{owner}/{repo}/pulls/{pull_number}
Fields to update: title, body, state, base, maintainer_can_modify
Optionalsignal: AbortSignalThe updated pull request
Represents a GitHub pull request resource with chainable async methods.
Implements
PromiseLike<GitHubPullRequest>so it can be awaited directly to fetch the pull request info, while also exposing sub-resource methods.Example