Github API - Test Config

GET /repos/{owner}/{repo}/pulls/{pull_number}
repos
pulls

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 and GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.

Lists details of a pull request by providing its number.

When you get, create, or edit a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the mergeable key. For more information, see "Checking mergeability of pull requests".

The value of the mergeable attribute can be true, false, or null. If the value is null, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-null value for the mergeable attribute in the response. If mergeable is true, then merge_commit_sha will be the SHA of the test merge commit.

The value of the merge_commit_sha attribute changes depending on the state of the pull request. Before merging a pull request, the merge_commit_sha attribute holds the SHA of the test merge commit. After merging a pull request, the merge_commit_sha attribute changes depending on how you merged the pull request:

  • If merged as a merge commit, merge_commit_sha represents the SHA of the merge commit.
  • If merged via a squash, merge_commit_sha represents the SHA of the squashed commit on the base branch.
  • If rebased, merge_commit_sha represents the commit that the base branch was updated to.

Pass the appropriate media type to fetch diff and patch formats.
Get a pull request

Arguments
key owner

owner [scalar]

The account owner of the repository. The name is not case sensitive.

API:
Github Open API
(version: 1.1.4)

key repo

repo [scalar]

The name of the repository. The name is not case sensitive.

API:
Github Open API
(version: 1.1.4)

key pull-number

pull-number [scalar]

The number that identifies the pull request.

API:
Github Open API
(version: 1.1.4)

Returns
200 application/json pull-request

pull-request [object]

Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.

Attributes
_links 2069

active_lock_reason string

additions integer

assignees simple-user []

author_association author-association

auto_merge auto-merge

base 2070

body string

changed_files integer

closed_at string

comments integer

comments_url string

commits integer

commits_url string

created_at string

deletions integer

diff_url string

draft boolean

Indicates whether or not the pull request is a draft.

head 2075

html_url string

id integer

issue_url string

labels 2081 []

locked boolean

maintainer_can_modify boolean

Indicates whether maintainers can modify the pull request.

merge_commit_sha string

mergeable boolean

mergeable_state string

merged boolean

merged_at string

milestone nullable-milestone

node_id string

number integer

Number uniquely identifying the pull request within its repository.

patch_url string

rebaseable boolean

requested_reviewers simple-user []

requested_teams team-simple []

review_comment_url string

review_comments integer

review_comments_url string

state string

State of this Pull Request. Either open or closed.

statuses_url string

title string

The title of the pull request.

updated_at string

url string

API:
Github Open API
(version: 1.1.4)
304 not_modified

not_modified [scalar]

Not modified

API:
Github Open API
(version: 1.1.4)
404 not_found

not_found [scalar]

Resource not found

API:
Github Open API
(version: 1.1.4)
500 internal_error

internal_error [scalar]

Internal Error

API:
Github Open API
(version: 1.1.4)
503 service_unavailable

service_unavailable [scalar]

Service unavailable

API:
Github Open API
(version: 1.1.4)
API:
Github Open API
(version: 1.1.4)