use_ci: Use continuous integration with pre-commit

View source: R/setup.R

use_ciR Documentation

Use continuous integration with pre-commit

Description

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

Usage

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 NULL 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.


precommit documentation built on July 2, 2022, 1:06 a.m.