delete_comment: Delete a comment from GitHub

Description Usage Arguments Details Value Examples

View source: R/comments.R

Description

This function deletes a comment from a gist, issue, pull request or commit, as long as you have appropriate permissions. Care should be taken as it will not be recoverable.

Usage

1
delete_comment(comment, gist, repo, type = "gist", ...)

Arguments

comment

(integer) The id 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

delete_comment() returns a TRUE if successfully deleted.

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
## Not run: 

  # Delete a gist comment
  delete_comment(
    comment = 622980929,
    gist    = "8e5be270de9a88168372293a813543f9"
  )

  # Delete a issue comment
  delete_comment(
    comment = 622980929,
    type    = "issue",
    repo    = "ChadGoymer/githapi"
  )

  # Delete a pull request comment
  delete_comment(
    comment = 418979473,
    type    = "pull_request",
    repo    = "ChadGoymer/githapi"
  )

  # Delete a commit comment
  delete_comment(
    comment = 38899533,
    type    = "commit",
    repo    = "ChadGoymer/githapi"
  )


## End(Not run)

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