Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use github_remote_list() instead of github_remotes() when GitHub not consulted #2055

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/pr.R
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@
branch <- git_branch()
tracking_branch <- git_branch_tracking(branch)
remote <- remref_remote(tracking_branch)
remote_dat <- github_remotes(remote, github_get = FALSE)
remote_dat <- github_remote_list(remote)

Check warning on line 665 in R/pr.R

View check run for this annotation

Codecov / codecov/patch

R/pr.R#L665

Added line #L665 was not covered by tests
ui_bullets(c("_" = "Create PR at link given below."))
view_url(glue_data(remote_dat, "{host_url}/{repo_spec}/compare/{branch}"))
}
Expand Down
16 changes: 8 additions & 8 deletions R/utils-github.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -899,7 +899,7 @@ new_ours <- function() {

new_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 <- TRUE
grl$default_branch <- "DEFAULT_BRANCH"

Expand All @@ -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"

Expand All @@ -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"

Expand All @@ -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"

Expand All @@ -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"

Expand All @@ -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"

Expand All @@ -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"

Expand Down
Loading