mirror of
https://github.com/rstudio/shiny.git
synced 2026-01-10 07:28:01 -05:00
Use HEAD for ref instead of master in runGitHub() (#3564)
Co-authored-by: Kathryn Doering <kathryn.doering@noaa.gov>
This commit is contained in:
2
NEWS.md
2
NEWS.md
@@ -11,6 +11,8 @@ shiny development
|
||||
|
||||
* HTML dependencies that are sent to dynamic UI now have better type checking, and no longer require a `dep.src.href` field. (#3537)
|
||||
|
||||
* Default for `ref` input in `runGithub()` changed from `"master"` to `"HEAD"`. (#3346)
|
||||
|
||||
* When taking a test snapshot, the sort order of the json keys of the `input`, `output`, and `export` fields is currently sorted using the locale of the machine. This can lead to inconsistent test snapshot results. To opt-in to a consistent ordering of snapshot fields with `{shinytest}`, please set the global option `options(shiny.snapshotsortc = TRUE)`. `{shinytest2}` users do not need to set this value. (#3515)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
@@ -121,7 +121,8 @@ runGist <- function(gist, destdir = NULL, ...) {
|
||||
#' @param username GitHub username. If `repo` is of the form
|
||||
#' `"username/repo"`, `username` will be taken from `repo`.
|
||||
#' @param ref Desired git reference. Could be a commit, tag, or branch name.
|
||||
#' Defaults to `"master"`.
|
||||
#' Defaults to `"HEAD"`, which means the default branch on GitHub, typically
|
||||
#' `"main"` or `"master"`.
|
||||
#' @export
|
||||
#' @examples
|
||||
#' ## Only run this example in interactive R sessions
|
||||
@@ -133,7 +134,7 @@ runGist <- function(gist, destdir = NULL, ...) {
|
||||
#' runGitHub("shiny_example", "rstudio", subdir = "inst/shinyapp/")
|
||||
#' }
|
||||
runGitHub <- function(repo, username = getOption("github.user"),
|
||||
ref = "master", subdir = NULL, destdir = NULL, ...) {
|
||||
ref = "HEAD", subdir = NULL, destdir = NULL, ...) {
|
||||
|
||||
if (grepl('/', repo)) {
|
||||
res <- strsplit(repo, '/')[[1]]
|
||||
|
||||
@@ -13,7 +13,7 @@ runGist(gist, destdir = NULL, ...)
|
||||
runGitHub(
|
||||
repo,
|
||||
username = getOption("github.user"),
|
||||
ref = "master",
|
||||
ref = "HEAD",
|
||||
subdir = NULL,
|
||||
destdir = NULL,
|
||||
...
|
||||
@@ -47,7 +47,8 @@ all valid values.}
|
||||
\code{"username/repo"}, \code{username} will be taken from \code{repo}.}
|
||||
|
||||
\item{ref}{Desired git reference. Could be a commit, tag, or branch name.
|
||||
Defaults to \code{"master"}.}
|
||||
Defaults to \code{"HEAD"}, which means the default branch on GitHub, typically
|
||||
\code{"main"} or \code{"master"}.}
|
||||
}
|
||||
\description{
|
||||
\code{runUrl()} downloads and launches a Shiny application that is hosted at
|
||||
|
||||
Reference in New Issue
Block a user