get_files_content {GitStats} | R Documentation |
Get content of files
Description
Pull text files content for a given scope (orgs, repos or whole git hosts).
Usage
get_files_content(
gitstats_object,
file_path = NULL,
use_files_structure = TRUE,
only_text_files = TRUE,
cache = TRUE,
verbose = is_verbose(gitstats_object),
progress = verbose
)
Arguments
gitstats_object |
A GitStats object. |
file_path |
Optional. A standardized path to file(s) in repositories.
May be a character vector if multiple files are to be pulled. If set to
|
use_files_structure |
Logical. If |
only_text_files |
A logical, |
cache |
A logical, if set to |
verbose |
A logical, |
progress |
A logical, by default set to |
Value
A data.frame.
Examples
## Not run:
my_gitstats <- create_gitstats() %>%
set_github_host(
token = Sys.getenv("GITHUB_PAT"),
orgs = c("r-world-devs")
) %>%
set_gitlab_host(
token = Sys.getenv("GITLAB_PAT_PUBLIC"),
orgs = "mbtests"
)
get_files_content(
gitstats_obj = my_gitstats,
file_path = c("LICENSE", "DESCRIPTION")
)
# example with files structure
files_structure <- get_files_structure(
gitstats_obj = my_gitstats,
pattern = "\\.Rmd",
depth = 2L
)
# get_files_content() will make use of pulled earlier files structure
files_content <- get_files_content(
gitstats_obj = my_gitstats
)
## End(Not run)