Given a repository name, check with git ls-remote whether the repository exists and return a TRUE/FALSE

check_git_repo(
  repo_name,
  token = NULL,
  silent = TRUE,
  return_repo = FALSE,
  verbose = TRUE
)

Arguments

repo_name

the name of the repository, e.g. jhudsl/OTTR_Template

token

A personal access token from GitHub. Only necessary if the repository being checked is a private repository.

silent

TRUE/FALSE of whether the warning from the git ls-remote command should be echoed back if it does fail.

return_repo

TRUE/FALSE of whether or not the output from git ls-remote should be saved to a file (if the repo exists)

verbose

TRUE/FALSE do you want more progress messages?

Value

A TRUE/FALSE whether or not the repository exists. Optionally the output from git ls-remote if return_repo = TRUE.

Examples

if (FALSE) { # \dontrun{

authorize("github")
check_git_repo("jhudsl/OTTR_Template")
} # }