Creates a SelectorTB object for specifying data sources (GitHub, GitLab, or local). The selector can be used to fetch issues from different sources.

init_selector(source = NULL, ...)

Arguments

source

a character string that is either:

  • "GitHub" if you want to fetch information from GitHub

  • "GitLab" if you want to fetch information from GitLab

  • or "local" if you want to fetch information locally.

...

Additional arguments specific to the source type:

  • For GitHub: owner, repo

  • For GitLab: project_id

  • For local: dataset_name, dataset_dir

Value

A SelectorTB object configured for the specified source.

Details

SelectorTB objects define data sources for retrieving issues from GitHub, GitLab, or local YAML files. They allow combining multiple sources into a single query using merge_selector().

See the corresponding vignettes: https://tanguybarthelemy.github.io/IssueTrackeR/articles/selectors.html to have more information about selectors. Also see vignette("selectors")

Examples

# GitHub selector for a specific repository
gh_sel <- init_selector(
    source = "GitHub",
    owner = "TanguyBarthelemy",
    repo = "IssueTrackeR"
)

# GitLab selector for multiple projects
gl_sel <- init_selector(source = "GitLab", project_id = c(4578, 2384))

# Local selector for a dataset
local_sel <- init_selector(
    source = "local",
    dataset_name = "my_dataset",
    dataset_dir = "/path/to/data"
)