Documentation
¶
Overview ¶
Package renovate provides helpers to surgically edit Renovate configuration files (renovate.json and renovate.json5) in place, preserving comments, quoting style and key order of the original file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ConfigPaths = []string{"renovate.json5", "renovate.json", ".github/renovate.json5", ".github/renovate.json", ".renovaterc", ".renovaterc.json"}
ConfigPaths are the configuration files Renovate reads in a repository, relative to its root, the generated renovate.json5 first.
Functions ¶
func Disables ¶ added in v8.130.1
Disables says whether a Renovate configuration turns Renovate off for the whole repository.
func FindConfigFile ¶
FindConfigFile returns the path to the Renovate config file found in dir, preferring renovate.json5 over renovate.json. It returns a configNotFoundError if neither file exists.
func HasConfig ¶ added in v8.140.0
HasConfig says whether the repository checked out at dir carries a Renovate configuration at any of ConfigPaths.
func IsConfigNotFound ¶
IsConfigNotFound asserts configNotFoundError.
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func SetReviewers ¶
SetReviewers sets the top-level `reviewers` array in the Renovate config at path to the given reviewers and writes the result back in place. Everything else in the file (comments, quoting, key order, formatting) is preserved byte-for-byte. If the file already has a `reviewers` key, only its value is replaced; otherwise the key is inserted as the first member of the root object.
The rendered value matches the quoting style the file already uses (single or double quotes, dominant wins for mixed files). The file extension is only a fallback for empty or quote-less files: renovate.json5 defaults to single quotes (the Giant Swarm house style), renovate.json to strict-JSON double quotes.
Types ¶
This section is empty.