From c0c3f8a19f908fafc2c666cdc4897c7e436f3d74 Mon Sep 17 00:00:00 2001 From: Nikolas Burkoff Date: Mon, 29 Nov 2021 10:28:00 +0000 Subject: [PATCH] use token_envvar for working out host type for additional error messages on cloning repo --- R/host.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/host.R b/R/host.R index 5007ee2..da89749 100644 --- a/R/host.R +++ b/R/host.R @@ -1,9 +1,9 @@ get_repo_access <- function(repo, host, token_envvar){ host_type <- NULL - if (host == "https://github.com") { + if (host == "https://github.com" || token_envvar == "GITHUB_PAT") { host_type <- "github" - } else if (host %in% c("https://gitlab.com", "https://code.roche.com")) { + } else if (host == "https://gitlab.com" || token_envvar == "GITLAB_PAT") { host_type = "gitlab" } else { return(NULL)