create_url_commit_diff | R Documentation |
Generates a URL to GitHub's web-based commit comparison interface and opens it if session is interactive.
create_url_commit_diff(user, repo, start, end)
browse_commit_diff(user, repo, start, end)
user |
Name of the User Account |
repo |
Name of the Repository |
start |
Start commit, tag, date, or branch |
end |
End commit, tag, date, or branch |
The gist of possible comparisons is given in the next table.
| Comparison Type | start | end | |:——————|:——————-:|:—————————————–:| | Forks | 'master' | 'octo-org:master' | | Tags | 'v2.2.0' | 'octocat:v2.3.3' | | Branches | 'master' | 'octocat:an-example-comparison-for-docs' | | Time | 'master@2weeks' | 'master' | | Time | 'master@MM-DD-YY' | 'master' | | Commits | 'c3a414e' | 'faf7c6f' | | Commits | '96d29b7^^^^^' | '96d29b7' |
A URL of the form:
'https://github.com/<user>/<repo>/compare/<start>...<end>'
<https://help.github.com/en/articles/comparing-commits-across-time>
browse_commit_diff("coatless", "ghapi3", start = "ab469f8", end = "f15f06e")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.