Skip to content

Commit d1c4523

Browse files
fix r cmd check
1 parent 37a860f commit d1c4523

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

API

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ roxygenize_with_cache(key, dirs)
1616
snippet_generate(snippet, open = rstudioapi::isAvailable(), root = here::here())
1717
uninstall_precommit(scope = "repo", ask = "user", root = here::here())
1818
update_precommit()
19-
use_ci(ci = getOption("precommit.ci", "native"), open = interactive(), force = FALSE, root = here::here())
19+
use_ci(ci = getOption("precommit.ci", "native"), force = FALSE, root = here::here())
2020
use_precommit(config_source = getOption("precommit.config_source"), force = FALSE, legacy_hooks = "forbid", open = rstudioapi::isAvailable(), install_hooks = TRUE, ci = getOption("precommit.ci", "native"), root = here::here())
2121
use_precommit_config(config_source = getOption("precommit.config_source"), force = FALSE, open = rstudioapi::isAvailable(), verbose = FALSE, root = here::here())
2222
version_precommit()

R/setup.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,12 @@ use_precommit <- function(config_source = getOption("precommit.config_source"),
7676
#' [pre-commit.ci](https://pre-commit.ci). Alternatively, `"gha"` can be used
7777
#' to set up [GitHub Actions](https://github.com/features/actions). Set value
7878
#' to `NULL` if you don't want to use a continuous integration.
79+
#' @param force Whether or not to overwrite an existing ci config file (only
80+
#' relevant for `ci = "gha"`).
7981
#' @inheritParams fallback_doc
8082
#' @export
8183
use_ci <- function(ci = getOption("precommit.ci", "native"),
82-
open = interactive(), force = FALSE, root = here::here()) {
84+
force = FALSE, root = here::here()) {
8385
if (is.na(ci)) {
8486
return()
8587
} else if (ci == "gha") {
@@ -99,7 +101,7 @@ use_ci <- function(ci = getOption("precommit.ci", "native"),
99101
} else if (ci == "native") {
100102
cli::cli_ul("Sign in with GitHub to authenticate {.url https://pre-commit.ci}.")
101103
Sys.sleep(2)
102-
browseURL("https://pre-commit.ci")
104+
utils::browseURL("https://pre-commit.ci")
103105
} else {
104106
rlang::abort(
105107
'Argument `ci` must be one of `"native"` (default), `"gha"` or `NULL`.'

man/use_ci.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/use_precommit.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)