Pulls a vector of repositories URLs (web or API): either all for
an organization or those with a given text in code blobs (with_code
parameter) or a file (with_files parameter).
Usage
get_repos_urls(
gitstats,
type = "api",
with_code = NULL,
in_files = NULL,
with_files = NULL,
cache = TRUE,
verbose = is_verbose(gitstats),
progress = verbose
)Arguments
- gitstats
A GitStats object.
- type
A character, choose if
apiorweb(html) URLs should be returned.apitype is set by default as settingwebresults in parsing which may be time consuming in case of large number of repositories.- with_code
A character vector, if defined,
GitStatswill pull repositories with specified code phrases in code blobs.- in_files
A character vector of file names. Works when
with_codeis set - then it searches code blobs only in files passed toin_filesparameter.- with_files
A character vector, if defined, GitStats will pull repositories with specified files.
- cache
A logical, if set to
TRUEGitStats will retrieve the last result from its storage.- verbose
A logical,
TRUEby default. IfFALSEmessages and printing output is switched off.- progress
A logical, by default set to
verbosevalue. IfFALSEnocliprogress bar will be displayed.
Examples
if (FALSE) { # \dontrun{
my_gitstats <- create_gitstats() %>%
set_github_host(
token = Sys.getenv("GITHUB_PAT"),
orgs = c("r-world-devs", "openpharma")
) %>%
set_gitlab_host(
token = Sys.getenv("GITLAB_PAT_PUBLIC"),
orgs = "mbtests"
)
get_repos_urls(my_gitstats, with_files = c("DESCRIPTION", "LICENSE"))
} # }