Currently, repo_exists will return FALSE if there's no repo with the same name for the account... but also if there's something wrong with the API.
repo_exists <- function(username, repo) {
!inherits(
try(gh::gh("GET /repos/:owner/:repo",
owner = username,
repo = repo
),
silent = TRUE
),
"try-error"
)
}
Currently,
repo_existswill returnFALSEif there's no repo with the same name for the account... but also if there's something wrong with the API.