Format the label in a simpler format
format_labels(raw_labels, verbose = TRUE)
a gh_response
object output from the function
gh
which contains all the data and metadata for GitHub
labels.
A logical value indicating whether to print additional
information. Default is TRUE
.
a list representing labels with simpler structure (with name, description, colour)
# \donttest{
# With labels
raw_labels <- gh::gh(
repo = "rjdemetra",
owner = "rjdverse",
endpoint = "/repos/:owner/:repo/labels",
.limit = Inf
)
format_labels(raw_labels)
#> Reading labels... Done!
#> 8 labels found.
#> name description color
#> 1 bug Something isn't working d73a4a
#> 2 duplicate This issue or pull request already exists cfd3d7
#> 3 enhancement New feature or request a2eeef
#> 4 good first issue Good for newcomers 7057ff
#> 5 help wanted Extra attention is needed 008672
#> 6 invalid This doesn't seem right e4e669
#> 7 question Further information is requested d876e3
#> 8 wontfix This will not be worked on ffffff
# }