Description Usage Arguments Details Value Examples
View source: R/pull-requests.R
This function updates a pull request for the specified repository in GitHub. It can be used to change the title or body, or used to close the pull request. It can also be used to assign the pull request to a user, request reviewers and replace labels or a milestone.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
pull_request |
(string or character) The number or title of the pull request. |
repo |
(string) The repository specified in the format: |
title |
(string, optional) The new title of the pull request. |
body |
(string, optional) The contents of the pull request. |
assignees |
(character, optional) Logins for Users to assign to this pull request. NOTE: Only users with push access can set assignees for new pull requests. |
reviewers |
(character, optional) Logins for Users to review this pull request. NOTE: Only users with push access can set reviewers for new pull requests. |
labels |
(character, optional) Labels to associate with this pull request. NOTE: Only users with push access can set labels for new pull requests. |
milestone |
(character or integer, optional) The title or number of the milestone to associate this pull request with. NOTE: Only users with push access can set the milestone for new pull requests. |
base |
(string, optional) The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. |
state |
(string, optional) The state of the pull request. Either
|
... |
Parameters passed to |
For more details see the GitHub API documentation:
https://docs.github.com/en/rest/reference/pulls#update-a-pull-request
https://docs.github.com/en/rest/reference/issues#update-an-issue
https://docs.github.com/en/rest/reference/pulls#request-reviewers-for-a-pull-request
update_pull_request()
returns a list of the pull request's
properties.
Pull Request Properties:
number: The number assigned to the pull request.
title: The title of the pull request.
body: The body contents of the pull request.
head_sha: The SHA of the commit to merge in.
head_ref: The reference, or branch, to merge in.
head_repo: The repository containing the branch to merge in.
base_sha: The SHA of the commit to merge onto.
base_ref: The reference, or branch, to merge onto.
merge_sha: The SHA of the merge commit, if the merge has been completed.
assignees: The users assigned to the pull request.
reviewers: The users reviewing the pull request.
labels: The labels attached to the pull request.
milestone: The milestone assigned to the pull request.
state: The state of the pull request - either "open"
or "closed"
.
repository: The repository the pull request is in.
html_url: The URL of the pull request's web page in GitHub.
diff_url: The URL of the pull request's diff web page in GitHub.
creator: The creator's login.
created_at: When the pull request was created.
updated_at: When the pull request was last updated.
mergeable: Whether the pull request can be merged.
rebaseable: Whether the pull request can be rebased.
merged: Whether the pull request has been merged
merged_by: Who merged the pull request.
merged_at: When the pull request was merged.
closed_at: When the pull request was closed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
# Update a pull request's properties
update_pull_request(
pull_request = "test pull request",
repo = "ChadGoymer/githapi",
title = "test updated pull request",
body = "This is an updated pull request"
)
# Close a pull request
update_pull_request(
pull_request = "test updated pull request",
repo = "ChadGoymer/githapi",
state = "closed"
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.