view_comments: View comments in GitHub

Description Usage Arguments Details Value Examples

View source: R/comments.R

Description

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.

Usage

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, ...)

Arguments

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

n_max

(integer, optional) Maximum number to return. Default: 1000.

...

Parameters passed to gh_page() or gh_request().

comment

(integer) The id of the comment.

type

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

Details

For more details see the GitHub API documentation:

Value

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:

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
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)

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