Learn R Programming

IssueTrackeR (version 1.2.0)

write_issues_to_dataset: Save datasets in a yaml file

Description

Save datasets in a yaml file

Usage

write_issues_to_dataset(issues, ...)

# S3 method for IssuesTB write_issues_to_dataset( issues, dataset_dir = getOption("IssueTrackeR.dataset.dir"), dataset_name = "list_issues.yaml", verbose = TRUE, ... )

# S3 method for default write_issues_to_dataset(issues, ...)

write_labels_to_dataset( labels, dataset_dir = getOption("IssueTrackeR.dataset.dir"), dataset_name = "list_labels.yaml", verbose = TRUE )

write_milestones_to_dataset( milestones, dataset_dir = getOption("IssueTrackeR.dataset.dir"), dataset_name = "list_milestones.yaml", verbose = TRUE )

Value

invisibly (with invisible()) TRUE if the export was successful and an error otherwise.

Arguments

issues

a IssuesTB object.

...

Unused parameter.

dataset_dir

A character string specifying the path which contains the datasets (only taken into account if source is set to "local"). Defaults to the package option IssueTrackeR.dataset.dir.

dataset_name

A character string specifying the name of the datasets which will be written (only taken into account if source is set to "local"). Defaults to "open_issues.yaml".

verbose

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

labels

a list representing all labels with simpler structure (with name, description, colour)

milestones

a list representing milestones with simpler structure (with title, description and due_on).

Details

Depending on the object, the defaults value of the argument dataset_name is:

  • "list_issues.yaml" for issues;

  • "list_labels.yaml" for labels;

  • "list_milestones.yaml" for milestones.

Examples

Run this code
path <- system.file("data_issues", package = "IssueTrackeR")
issues <- get_issues(
    source = "local",
    dataset_dir = path,
    dataset_name = "list_issues.yaml"
)
milestones <- get_milestones(
    source = "local",
    dataset_dir = path,
    dataset_name = "list_milestones.yaml"
)
labels <- get_labels(
    source = "local",
    dataset_dir = path,
    dataset_name = "list_labels.yaml"
)

write_issues_to_dataset(issues)
write_labels_to_dataset(labels)
write_milestones_to_dataset(milestones)

Run the code above in your browser using DataLab