Description Usage Arguments Details Value Examples
view_comments()
summarises comments in a table with the properties as
columns and a row for each comment registered for the gist, issue, pull
request or commit. view_comment()
returns a list of all properties for a
single comment. browse_comment()
opens the web page for the comment in the
default browser.
1 2 3 4 5 | view_comments(gist, issue, pull_request, commit, repo, n_max = 1000, ...)
view_comment(comment, gist, repo, type = "gist", ...)
browse_comment(comment, repo, type, ...)
|
gist |
(string, optional) The ID of the gist. |
issue |
(integer, optional) The issue number. |
pull_request |
(integer, optional) The pull request number. |
commit |
(string, optional) Either a SHA or branch used to identify the commit. |
repo |
(string) The repository specified in the format: |
n_max |
(integer, optional) Maximum number to return. Default: |
... |
Parameters passed to |
comment |
(integer) The id of the comment. |
type |
(string, optional) Whether the comment is for a |
For more details see the GitHub API documentation:
https://docs.github.com/en/rest/reference/gists#list-gist-comments
https://docs.github.com/en/rest/reference/issues#list-issue-comments
https://docs.github.com/en/rest/reference/pulls#list-review-comments-on-a-pull-request
https://docs.github.com/en/rest/reference/repos#list-commit-comments
https://docs.github.com/en/rest/reference/gists#get-a-gist-comment
https://docs.github.com/en/rest/reference/issues#get-an-issue-comment
https://docs.github.com/en/rest/reference/pulls#get-a-review-comment-for-a-pull-request
https://docs.github.com/en/rest/reference/repos#get-a-commit-comment
view_comments()
returns a tibble of comment properties.
view_comment()
returns a list of properties for a single comment.
browse_comment()
opens the default browser on the comment page and
returns the URL.
Comment Properties:
id: The id of the comment.
body: The content of the comment.
commit: The commit associated with the comment (only for pull request or commit comments).
path: The path of the file to add the comment to (only for pull request or commit comments).
position: The line number in the file to attach the comment to (only for pull request or commit comments).
user: The comment author's account login.
html_url: The address of the comment's web page.
created_at: The time and date the comment was created.
published_at: The time and date the comment was published.
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | ## Not run:
# View comments on a gist
view_comments(gist = "8e5be270de9a88168372293a813543f9")
# View comments on an issue
view_comments(
issue = "test issue",
repo = "ChadGoymer/githapi"
)
# View comments on a pull request
view_comments(
pull_request = "test pull request",
repo = "ChadGoymer/githapi"
)
# View comments on a commit
view_comments(
commit = "main",
repo = "ChadGoymer/githapi"
)
# View a single gist comment
view_comment(
comment = 622980929,
gist = "8e5be270de9a88168372293a813543f9"
)
# View a single issue comment
view_comment(
comment = 622980929,
type = "issue",
repo = "ChadGoymer/githapi"
)
# View a single pull request comment
view_comment(
comment = 418979473,
type = "pull_request",
repo = "ChadGoymer/githapi"
)
# View a single commit comment
view_comment(
comment = 38899533,
type = "commit",
repo = "ChadGoymer/githapi"
)
# Browse an issue comment
browse_comment(
comment = 622980929,
type = "issue",
repo = "ChadGoymer/githapi"
)
# Browse a pull request comment
browse_comment(
comment = 418979473,
type = "pull_request",
repo = "ChadGoymer/githapi"
)
# Browse a commit comment
browse_comment(
comment = 38899533,
type = "commit",
repo = "ChadGoymer/githapi"
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.