Format the milestones in a simpler format

format_milestones(raw_milestones, verbose = TRUE)

Arguments

raw_milestones

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

verbose

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

Value

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

Examples


# \donttest{
# With milestones
milestones_jdplus_main <- gh::gh(
    repo = "jdplus-main",
    owner = "jdemetra",
    endpoint = "/repos/:owner/:repo/milestones",
    state = "all",
    .limit = Inf
 )
format_milestones(milestones_jdplus_main)
#> Reading milestones... 
#> 	-  backlog ... Done!
#> 	-  3.2.2 ... Done!
#> 	-  3.2.3 ... Done!
#> 	-  3.4.0 ... Done!
#> 	-  3.5.0 ... Done!
#> 	-  3.6.0 ... Done!
#> Done! 6 milestones found.
#>     title description     due_on
#> 1 backlog                   <NA>
#> 2   3.2.2                   <NA>
#> 3   3.2.3                   <NA>
#> 4   3.4.0                   <NA>
#> 5   3.5.0             2025-03-31
#> 6   3.6.0             2025-06-30
# }