get_issues {IssueTrackeR} | R Documentation |
Retrieve information from the issues of GitHub
Description
use gh
to ask the API of GitHub and et a list of issues
with their labels and milestones.
Usage
get_issues(
source = c("local", "online"),
dataset_dir = getOption("IssueTrackeR.dataset.dir"),
dataset_name = "open_issues.yaml",
repo = getOption("IssueTrackeR.repo"),
owner = getOption("IssueTrackeR.owner"),
state = c("open", "closed", "all"),
verbose = TRUE
)
get_labels(
source = c("local", "online"),
dataset_dir = getOption("IssueTrackeR.dataset.dir"),
dataset_name = "list_labels.yaml",
repo = getOption("IssueTrackeR.repo"),
owner = getOption("IssueTrackeR.owner"),
verbose = TRUE
)
get_milestones(
source = c("local", "online"),
dataset_dir = getOption("IssueTrackeR.dataset.dir"),
dataset_name = "list_milestones.yaml",
repo = getOption("IssueTrackeR.repo"),
owner = getOption("IssueTrackeR.owner"),
verbose = TRUE
)
Arguments
source |
a character string that is either |
dataset_dir |
A character string specifying the path which contains the
datasets (only taken into account if |
dataset_name |
A character string specifying the name of the datasets
which will be written (only taken into account if |
repo |
A character string specifying the GitHub repository name (only
taken into account if |
owner |
A character string specifying the GitHub owner (only taken
into account if |
state |
a character string that is either |
verbose |
A logical value indicating whether to print additional
information. Default is |
Details
The functions of get type are useful to retrieve object related to issues from GitHub. So it's possible to retrieve issues, labels and milestones.
The defaults value for the argument dataset_name
depends on the
function:
defaults is
"list_issues.yaml"
forget_issues()
defaults is
"list_milestones.yaml"
forget_milestones()
defaults is
"list_labels.yaml"
forget_labels()
Value
The function get_issues
returns an object of class IssuesTB
. It
is a list composed by object of class IssueTB
. An object of class
IssueTB
represents an issue with simpler structure (with number,
title, body and labels).
The function get_labels
returns a list representing labels with
simpler structure (with name, description, colour).
The function get_milestones
returns a list representing milestones
with simpler structure (with title, description and due_on).
Examples
# From online
issues <- get_issues(source = "online")
print(issues)
labels <- get_labels(source = "online")
print(labels)
milestones <- get_milestones(source = "online")
print(milestones)
# From local
# First update the local database
update_database(verbose = TRUE)
issues <- get_issues(source = "local",
dataset_name = "open_issues.yaml",
state = "open")
labels <- get_labels(source = "local")
milestones <- get_milestones(source = "local")