Skip to contents

Pull text files content for a given scope (orgs, repos or whole git hosts).

Usage

get_files(
  gitstats_object,
  file_path,
  cache = TRUE,
  verbose = is_verbose(gitstats_object)
)

Arguments

gitstats_object

A GitStats object.

file_path

A standardized path to file(s) in repositories. May be a character vector if multiple files are to be pulled.

cache

A logical, if set to TRUE GitStats will retrieve the last result from its storage.

verbose

A logical, TRUE by default. If FALSE messages and printing output is switched off.

Value

A data.frame.

Examples

if (FALSE) {
 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(my_gitstats, c("LICENSE", "DESCRIPTION"))
}