R/repo_is_template.R

Defines functions repo_is_template

Documented in repo_is_template

#' @rdname repo_core
#' @export
#'
repo_is_template = function(repo) {

  arg_is_chr(repo)

  # Checking if repo exists
  purrr::map_lgl(
    repo,
    function(repo) {
      res = purrr::safely(github_api_repo)(repo)
      status_msg(
        res,
        fail = "Failed to retrieve repo {.val {repo}}."
      )

      if (succeeded(res)) {
        result(res)[["is_template"]]
      } else {
        NA
      }
    }
  )
}

Try the ghclass package in your browser

Any scripts or data that you put into this service are public.

ghclass documentation built on May 29, 2024, 8:44 a.m.