use gh to ask the API of GitHub and et a list of issues with their labels and milestones.

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 "online" if you want to fetch information from GitHub or "local" (by default) if you want to fetch information locally.

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".

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.

state

a character string that is either "open" (by default) if you want to fetch only open issues from GitHub, "closed" if you want to fetch only closed issues from GitHub or "all" if you want to fetch all issues from GitHub (closed and open). Only taken into account if source is set to "online".

verbose

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

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).

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" for get_issues()

  • defaults is "list_milestones.yaml" for get_milestones()

  • defaults is "list_labels.yaml" for get_labels()

Examples


# \donttest{
# From online

issues <- get_issues(source = "online")
print(issues)
#> There are 5 issues. 
#> 
#> 
#> ── Issue rjdverse/rjdemetra#164 ──
#> 
#> Title: Error on short series
#> Text:
#> With short quaterly series, the estimation fails when beginning in 2023 but success in 2024.
#> In **RSA5c**, it may be related to the calendar regressor (because it doesn't fail with **RSA3**).
#> 
#> Here is a reproductible example:
#> 
#> ``` r
#> library("RJDemetra")
#> 
#> set.seed(3)
#> x <- rnorm(12)
#> 
#> mod1 <- x13(ts(x, frequency = 4L, sta
#> ...
#> 
#> 
#> ── Issue rjdverse/rjdemetra#162 ──
#> 
#> Title: How to differentiate a WS in V2 and in V3?
#> Text:
#> *related to rjdverse/rjd3workspace#53*
#> 
#> When I try to load a WS in v3 with **{RJDemetra}** (with `load_workspace()`), I get no error but I will get error when trying to access other elements.
#> 
#> How to know if a WS is in V3 with **{RJDemetra}**? Is it possible?
#> 
#> ── Issue rjdverse/rjdemetra#156 ──
#> 
#> Title: Possible to extract slidingspan main diagnostics ?
#> Text:
#> I wondered if it was possible in rjdemetra to extract and save the main slidingspan diagnostics of % unstable observations (A% and MM%) that are calculated  and displayed (but not saved) in JDemetra+ ?

#> 

#> I guess this is not an “issue”, but rather a (Christmas) wish

#> 

#> Best regards 

#> Jørn Ivar Hamre

#> (Statistics Norway
#> ...
#> 
#> 
#> ── Issue rjdverse/rjdemetra#142 ──
#> 
#> Title: Printing userdef variables with their name
#> Text:
#> When you display a model (obtained with the get_model function), the regression variables are not displayed with their real name but with a name given by jdemetra+:

#> 

#> ![image](https://github.com/jdemetra/rjdemetra/assets/112711017/2dc551f8-2c0a-4da0-bc12-d74285537247)

#> 

#> However, their variable name does exist in the 
#> ...
#> 
#> 
#> ── Issue rjdverse/rjdemetra#76 ──
#> 
#> Title: Leap Year Effect
#> Text:
#> I am running into problems including the leap year:

#> https://github.com/statistikat/persephone/issues/21

#> 

#> Am I missing some additional parameters that need to be set?

labels <- get_labels(source = "online")
#> Reading labels... Done!
#> 8 labels found.
print(labels)
#>               name                               description  color      repo
#> 1              bug                   Something isn't working d73a4a rjdemetra
#> 2        duplicate This issue or pull request already exists cfd3d7 rjdemetra
#> 3      enhancement                    New feature or request a2eeef rjdemetra
#> 4 good first issue                        Good for newcomers 7057ff rjdemetra
#> 5      help wanted                 Extra attention is needed 008672 rjdemetra
#> 6          invalid                   This doesn't seem right e4e669 rjdemetra
#> 7         question          Further information is requested d876e3 rjdemetra
#> 8          wontfix                This will not be worked on ffffff rjdemetra
#>      owner
#> 1 rjdverse
#> 2 rjdverse
#> 3 rjdverse
#> 4 rjdverse
#> 5 rjdverse
#> 6 rjdverse
#> 7 rjdverse
#> 8 rjdverse

milestones <- get_milestones(source = "online")
#> Reading milestones... 
#> Done! 0 milestones found.
print(milestones)
#> data frame with 0 columns and 0 rows
# }

# From local

path <- system.file("data_issues", package = "IssueTrackeR")
issues <- get_issues(
    source = "local",
    dataset_dir = path,
    dataset_name = "list_issues.yaml"
)
#> The issues will be read from /home/runner/work/_temp/Library/IssueTrackeR/data_issues/list_issues.yaml.
milestones <- get_milestones(
    source = "local",
    dataset_dir = path,
    dataset_name = "list_milestones.yaml"
)
#> The milestones will be read from /home/runner/work/_temp/Library/IssueTrackeR/data_issues/list_milestones.yaml.
labels <- get_labels(
    source = "local",
    dataset_dir = path,
    dataset_name = "list_labels.yaml"
)
#> The labels will be read from /home/runner/work/_temp/Library/IssueTrackeR/data_issues/list_labels.yaml.