Description Usage Arguments Details Value Examples
view_commits()
summarises commits in a table with the properties as columns
and a row for each commit in the history of the given reference.
view_commit()
returns a list of all properties for a single commit.
browse_commits()
and browse_commit()
opens the web page for the commit
history and commit details respectively in the default browser.
1 2 3 4 5 6 7 | view_commits(ref, repo, path, author, since, until, n_max = 1000, ...)
view_commit(ref, repo, ...)
browse_commits(ref, repo, ...)
browse_commit(ref, repo, ...)
|
ref |
(string) Either a SHA, branch or tag used to identify the commit. |
repo |
(string) The repository specified in the format: |
path |
(string, optional) Only commits containing this file path will be returned. |
author |
(string, optional) Author login to filter commits by. |
since |
(string, optional) A date & time to filter by. Must be in the
format: |
until |
(string, optional) A date & time to filter by. Must be in the
format: |
n_max |
(integer, optional) Maximum number to return. Default: |
... |
Parameters passed to |
For more details see the GitHub API documentation:
https://docs.github.com/en/rest/reference/repos#list-commits
https://docs.github.com/en/rest/reference/repos#get-a-commit
view_commits()
returns a tibble of commit properties.
view_commit()
returns a list of properties for a single commit.
browse_commits()
and browse_commit
opens the default browser on the
commit's history or details page and returns the URL.
Commit Properties:
sha: The commit SHA.
message: The commit message.
author_login: The author's account login.
author_name: The author's name.
author_email: The author's email address.
committer_login: The committer's account login.
committer_name: The committer's name.
committer_email: The committer's email address.
tree_sha: The SHA of the commit's file tree.
parents: The SHAs of the parent commits.
date: The time and date the commit was made.
html_url: The address of the commit's web page.
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 27 28 29 30 31 32 33 34 35 | ## Not run:
# View the history of commits for the main branch
view_commits("main", "ChadGoymer/githapi")
# View commits where the README.md file has been changed
view_commits(
ref = "main",
repo = "ChadGoymer/githapi",
path = "README.md"
)
# View commits created by an author
view_commits(
ref = "main",
repo = "ChadGoymer/githapi",
author = "ChadGoymer"
)
# View commits within a time window
view_commits(
ref = "main",
repo = "ChadGoymer/githapi",
since = "2020-01-01 00:00:00",
until = "2020-04-01 00:00:00"
)
# View the properties of the last commit on the main branch
view_commit("main", "ChadGoymer/githapi")
# View the properties of the commit with tag "0.8.7"
view_commit("0.8.7", "ChadGoymer/githapi")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.