From 44c896ce8a28266932e9572e9f4690ba2e61e9d9 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Tue, 10 Sep 2024 08:44:06 -0500 Subject: [PATCH] Use `github_remote_list()` for testing To reduce some of the usage of `github_remotes()` where it's not strictly necessary. --- R/utils-github.R | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/R/utils-github.R b/R/utils-github.R index abba6d408..58610fc0c 100644 --- a/R/utils-github.R +++ b/R/utils-github.R @@ -883,7 +883,7 @@ new_no_github <- function() { new_ours <- function() { remotes <- data.frame(name = "origin", url = "https://github.com/OWNER/REPO.git") - grl <- github_remotes(github_get = FALSE, x = remotes) + grl <- github_remote_list(x = remotes) grl$github_got <- grl$perm_known <- TRUE grl$default_branch <- "DEFAULT_BRANCH" @@ -917,7 +917,7 @@ new_fork <- function() { name = c("origin", "upstream"), url = c("https://github.com/CONTRIBUTOR/REPO.git", "https://github.com/OWNER/REPO.git") ) - grl <- github_remotes(github_get = FALSE, x = remotes) + grl <- github_remote_list(x = remotes) grl$github_got <- grl$perm_known <- TRUE grl$default_branch <- "DEFAULT_BRANCH" @@ -940,7 +940,7 @@ new_fork <- function() { new_maybe_ours_or_theirs <- function() { remotes <- data.frame(name = "origin", url = "https://github.com/OWNER/REPO.git") - grl <- github_remotes(github_get = FALSE, x = remotes) + grl <- github_remote_list(x = remotes) grl$github_got <-grl$perm_known <- FALSE grl$default_branch <- "DEFAULT_BRANCH" @@ -956,7 +956,7 @@ new_maybe_fork <- function() { name = c("origin", "upstream"), url = c("https://github.com/CONTRIBUTOR/REPO.git", "https://github.com/OWNER/REPO.git") ) - grl <- github_remotes(github_get = FALSE, x = remotes) + grl <- github_remote_list(x = remotes) grl$github_got <-grl$perm_known <- FALSE grl$default_branch <- "DEFAULT_BRANCH" @@ -973,7 +973,7 @@ new_fork_cannot_push_origin <- function() { name = c("origin", "upstream"), url = c("https://github.com/CONTRIBUTOR/REPO.git", "https://github.com/OWNER/REPO.git") ) - grl <- github_remotes(github_get = FALSE, x = remotes) + grl <- github_remote_list(x = remotes) grl$github_got <-grl$perm_known <- TRUE grl$default_branch <- "DEFAULT_BRANCH" @@ -993,7 +993,7 @@ new_fork_upstream_is_not_origin_parent<- function() { name = c("origin", "upstream"), url = c("https://github.com/CONTRIBUTOR/REPO.git", "https://github.com/OLD_OWNER/REPO.git") ) - grl <- github_remotes(github_get = FALSE, x = remotes) + grl <- github_remote_list(x = remotes) grl$github_got <- grl$perm_known <- TRUE grl$default_branch <- "DEFAULT_BRANCH" @@ -1018,7 +1018,7 @@ new_upstream_but_origin_is_not_fork <- function() { name = c("origin", "upstream"), url = c("https://github.com/CONTRIBUTOR/REPO.git", "https://github.com/OWNER/REPO.git") ) - grl <- github_remotes(github_get = FALSE, x = remotes) + grl <- github_remote_list(x = remotes) grl$github_got <-grl$perm_known <- TRUE grl$default_branch <- "DEFAULT_BRANCH"