Sets up continuous integration, or prompts the user to do it manually.

use_ci(
  ci = getOption("precommit.ci", "native"),
  force = FALSE,
  open = rstudioapi::isAvailable(),
  root = here::here()
)

Arguments

ci

Specifies which continuous integration service to use. See vignette("ci", package = "precommit") for details. Defaults to getOption("precommit.ci", "native"), which is set to "native" on package loading (if unset). "native" sets up pre-commit.ci. Alternatively, "gha" can be used to set up GitHub Actions. Set value to NA if you don't want to use a continuous integration.

force

Whether or not to overwrite an existing ci config file (only relevant for ci = "gha").

open

Whether or not to open pre-commit.ci (if ci = "native"). The default is TRUE when working in RStudio.

root

The path to the root directory of your project.