Description Usage Arguments Details Value Examples
View source: R/pull-requests.R
view_pull_requests()
summarises pull requests in a table with the
properties as columns and a row for each pull request in the repository.
view_pull_request()
returns a list of all properties for a single pull
request. browse_pull_request()
opens the web page for the pull request in
the default browser.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | view_pull_requests(
repo,
head,
base,
state = "open",
sort = "created",
direction = "desc",
n_max = 1000,
...
)
view_pull_request(pull_request, repo, n_max = 1000, ...)
browse_pull_request(pull_request, repo, ...)
|
repo |
(string) The repository specified in the format: |
head |
(string, optional) Filter pull requests by the branch name. If it
is not in the specified |
base |
(string, optional) Filter pull requests by the branch to be merged into. |
state |
(string, optional) The state of the pull requests to return. Can
be either |
sort |
(string, optional) The property to order the returned pull
requests by. Can be either |
direction |
(string, optional) The direction of the sort. Can be either
|
n_max |
(integer, optional) Maximum number to return. Default: |
... |
Parameters passed to |
pull_request |
(string or character) The number or title of the pull request. |
You can filter the pull requests by the head and base branches (the branch to
merge in and the branch to merge into) or the state (whether they are
"open"
or "closed"
). You can also order the results with sort
and
direction
.
For more details see the GitHub API documentation:
https://docs.github.com/en/rest/reference/pulls#list-pull-requests
https://docs.github.com/en/rest/reference/pulls#get-a-pull-request
view_pull_requests()
returns a tibble of pull request properties.
view_pull_request()
returns a list of properties for a single pull
request. browse_pull_request()
opens the default browser on the pull
request's page and returns the URL.
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.
Additionally, the view_pull_request()
function also returns:
commits: Information about the commits made on the branch.
message: The message specified for the commit.
author_name: The author's name.
author_email: The author's email address.
author_date: The date/time it was authored.
committer_name: The committer's name.
committer_email: The committer's email address.
committer_date: The date/time it was committed.
parent_sha: The SHA of the parent commit(s).
html_url: The URL of the commit's web page in GitHub.
files: Information about the files changed.
sha: The SHA of the file.
filename: The name of the file.
status: The status of the file.
additions: The number of lines added.
deletions: The number of lines deleted.
changes: The number of lines changed.
patch: The patch information.
html_url: The URL of the file's web page in GitHub.
reviews: The reviews registered.
body: The contents of the review.
state: The state of the review.
user: The user who added the review.
html_url: Th URL of the review's web page in GitHub.
submitted_at: When the review was submitted.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
# View all open pull requests
view_pull_requests("ChadGoymer/githapi")
# View all closed pull requests
view_pull_requests("ChadGoymer/githapi", state = "closed")
# View all pull requests for the "main" branch
view_pull_requests("ChadGoymer/githapi", base = "main")
# View pull requests, sorted by the most recently updated
view_pull_requests(
repo = "ChadGoymer/githapi",
sort = "updated",
direction = "desc"
)
# View single pull request
view_pull_request("test pull request", repo = "ChadGoymer/githapi")
# Open a pull request's page in a browser
browse_pull_request("test pull request", repo = "ChadGoymer/githapi")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.