Description Usage Arguments Details Value Examples
This function updates a comment for a gist, issue, pull request or commit. It
can be used to replace the content of the comment. The repo
argument is not
required if a gist is specified.
1 | update_comment(comment, body, gist, repo, type = "gist", ...)
|
comment |
(integer) The id of the comment. |
body |
(string) The content of the comment. |
gist |
(string, optional) The ID of the gist. |
repo |
(string) The repository specified in the format: |
type |
(string, optional) Whether the comment is for a |
... |
Parameters passed to |
For more details see the GitHub API documentation:
https://docs.github.com/en/rest/reference/gists#update-a-gist-comment
https://docs.github.com/en/rest/reference/issues#update-an-issue-comment
https://docs.github.com/en/rest/reference/pulls#update-a-review-comment-for-a-pull-request
https://docs.github.com/en/rest/reference/repos#update-a-commit-comment
update_comment()
returns a list of the comment properties.
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 | ## Not run:
# Update a gist comment
update_comment(
comment = 3281939,
body = "This comment has been updated by update_comment()",
gist = "8e5be270de9a88168372293a813543f9"
)
# Update an issue comment
update_comment(
comment = 622980929,
body = "This comment has been updated by update_comment()",
type = "issue",
repo = "ChadGoymer/githapi"
)
# Update an pull request comment
update_comment(
comment = 418979473,
body = "This comment has been updated by update_comment()",
type = "pull_request",
repo = "ChadGoymer/githapi"
)
# Update a commit comment
update_comment(
comment = 38899533,
body = "This comment has been updated by update_comment()",
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.