This version of GitHub Enterprise was discontinued on 2021-03-02. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Pulls

In this article

The Pull Request API allows you to list, view, edit, create, and even merge pull requests. Comments on pull requests can be managed via the Issue Comments API.

Every pull request is an issue, but not every issue is a pull request. For this reason, "shared" actions for both features, like manipulating assignees, labels and milestones, are provided within the Issues API.

Custom media types for pull requests

These are the supported media types for pull requests.

application/vnd.github.VERSION.raw+json
application/vnd.github.VERSION.text+json
application/vnd.github.VERSION.html+json
application/vnd.github.VERSION.full+json
application/vnd.github.VERSION.diff
application/vnd.github.VERSION.patch

For more information, see "Custom media types."

If a diff is corrupt, contact your site administrator. Include the repository name and pull request ID in your message.

Pull Requests have these possible link relations:

NameDescription
selfThe API location of this Pull Request.
htmlThe HTML location of this Pull Request.
issueThe API location of this Pull Request's Issue.
commentsThe API location of this Pull Request's Issue comments.
review_commentsThe API location of this Pull Request's Review comments.
review_commentThe URL template to construct the API location for a Review comment in this Pull Request's repository.
commitsThe API location of this Pull Request's commits.
statusesThe API location of this Pull Request's commit statuses, which are the statuses of its head branch.

List pull requests

Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team, GitHub Enterprise Server 2.17+, and GitHub Enterprise Cloud.

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

Parameters

Name Type In Description
accept string header

Setting to application/vnd.github.v3+json is recommended. See preview notices

owner