pull_request
Overview
Name | pull_request |
Type | Resource |
Id | github.pulls.pull_request |
Fields
Name | Datatype | Description |
---|---|---|
id | integer | |
_links | object | |
active_lock_reason | string | |
additions | integer | |
assignee | object | A GitHub user. |
assignees | array | |
author_association | string | How the author is associated with the repository. |
auto_merge | object | The status of auto merging a pull request. |
base | object | |
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 | object | |
html_url | string | |
issue_url | string | |
labels | array | |
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 | |
merged_by | object | A GitHub user. |
milestone | object | A collection of related issues and pull requests. |
node_id | string | |
number | integer | Number uniquely identifying the pull request within its repository. |
patch_url | string | |
rebaseable | boolean | |
requested_reviewers | array | |
requested_teams | array | |
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 | |
user | object | A GitHub user. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | owner, pull_number, repo | 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. |
create | INSERT | owner, repo, data__base, data__head | 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. To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details. |
check_if_merged | EXEC | owner, pull_number, repo | Checks if a pull request has been merged into the base branch. The HTTP status of the response indicates whether or not the pull request has been merged; the response body is empty. |
merge | EXEC | owner, pull_number, repo | Merges a pull request into the base branch. This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details. |
update | EXEC | owner, pull_number, repo | 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. To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. |
update_branch | EXEC | owner, pull_number, repo | Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. |