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 ¶
This section is empty.
Functions ¶
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 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.