update_comment: Update a comment in a repository

Description Usage Arguments Details Value Examples

View source: R/comments.R

Description

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.

Usage

1
update_comment(comment, body, gist, repo, type = "gist", ...)

Arguments

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: owner/repo.

type

(string, optional) Whether the comment is for a "gist", "issue", "pull_request" or "commit". Default: "gist".

...

Parameters passed to gh_request().

Details

For more details see the GitHub API documentation:

Value

update_comment() returns a list of the comment properties.

Comment Properties:

Examples

 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)

ChadGoymer/githapi documentation built on Oct. 22, 2021, 10:56 a.m.