Format the issue in a simpler format

format_issues(
  raw_issues,
  raw_comments,
  repo = getOption("IssueTrackeR.repo"),
  owner = getOption("IssueTrackeR.owner"),
  verbose = TRUE
)

Arguments

raw_issues

a gh_response object output from the function gh which contains all the data and metadata for GitHub issues.

raw_comments

a gh_response object output from the function gh which contains all the data and metadata for GitHub comments.

repo

A character string specifying the GitHub repository name (only taken into account if source is set to "online"). Defaults to the package option IssueTrackeR.repo.

owner

A character string specifying the GitHub owner (only taken into account if source is set to "online"). Defaults to the package option IssueTrackeR.owner.

verbose

A logical value indicating whether to print additional information. Default is TRUE.

Value

a list representing an issue with simpler structure (with number, title, body and labels) of all issues.

Examples


# \donttest{
raw_issues <- gh::gh(
    repo = "rjdemetra",
    owner = "rjdverse",
    endpoint = "/repos/:owner/:repo/issues",
    .limit = Inf
)
raw_comments <- gh::gh(
    repo = "rjdemetra",
    owner = "rjdverse",
    endpoint = "/repos/:owner/:repo/issues/comments",
    .limit = Inf
)
all_issues <- format_issues(raw_issues = raw_issues,
                            raw_comments = raw_comments,
                            verbose = FALSE)
# }