From a16a61d63d6fab1c10aaae96c6769bcf228ad525 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Tue, 7 Jun 2022 19:02:18 -0700 Subject: [PATCH] Rename old master branch to main in .dev/compare_branches --- .dev/compare_branches.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.dev/compare_branches.R b/.dev/compare_branches.R index 246b00080e..bb10e15548 100755 --- a/.dev/compare_branches.R +++ b/.dev/compare_branches.R @@ -1,6 +1,6 @@ #!/usr/local/bin/Rscript -# compare the lints obtained before/after a given PR/branch vs a base branch (default master). +# compare the lints obtained before/after a given PR/branch vs a base branch (default main). # # How to use: # See below (param_list <-) for documentation of the script's arguments. @@ -71,9 +71,9 @@ param_list <- list( optparse::make_option( "--base_branch", default = if (interactive()) { - readline("Name a branch to use as base (skip to use master): ") + readline("Name a branch to use as base (skip to use main): ") } else { - "master" + "main" }, help = "Compare to this branch" ), @@ -135,7 +135,7 @@ if (interactive()) { # typed arguments get cast even when missing, probably to NA if (isTRUE(is.na(params[[opt]]) || params[[opt]] == "")) params[[opt]] <- NULL } - if (isTRUE(is.na(params$base_branch) || params$base_branch == "")) params$base_branch <- "master" + if (isTRUE(is.na(params$base_branch) || params$base_branch == "")) params$base_branch <- "main" } linter_names <- strsplit(params$linters, ",", fixed = TRUE)[[1L]] @@ -308,7 +308,7 @@ run_workflow <- function(what, packages, linter_names, branch, number) { # safe to use force=TRUE because we're in temp_repo if (what == "pr") { # pr_fetch doesn't expose this so use this to reset - gert::git_branch_checkout("master", force = TRUE) + gert::git_branch_checkout("main", force = TRUE) usethis::pr_fetch(number) } else { gert::git_branch_checkout(branch, force = TRUE)