g_comments: Get issue comments.

Description Usage Arguments Value See Also Examples

View source: R/g_comments.r

Description

This function retrieves comments on issues for one of three scenarios. 1. All comments for a repository - specify repo owner, and repo 2. All comments for an issue within a repository - specify repo owner, repo, and issue number 3. A single comment - specify repo owner, repo, and comment ID

See examples below for these three scenarios.

Usage

1
2
  g_comments(owner, repo, issue = NULL, commentid = NULL,
    sort = NULL, direction = NULL, since = NULL, ...)

Arguments

owner

Name of owner of repository.

repo

Repository name, quoted.

issue

Issue number, is specific to a repo.

commentid

Comment ID number.

sort

created, updated, comments, default: created.

direction

asc or desc, default: desc.

since

Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ

...

Futher arguments passed on to link{GET}.

Value

Issue comments data for a single issue, all comments in a repo, or a single comment.

See Also

There are three other functions for creating link{g_comments_create}, editing link{g_comments_edit}, and deleting link{g_comments_delete} comments.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
g_auth()
options(useragent='ropensci')

# List all comments in a repo
g_comments(owner='ropensci', repo='reml')

# List comments on a specific issue
g_comments(owner='ropensci', repo='reml', issue=5)

# Get a single comment, default action is 'get', so no need to specify it
g_comments(owner='ropensci', repo='reml', commentid=12345)

## End(Not run)

ropensci/gitr documentation built on May 27, 2019, 4:30 p.m.