renovate

package
v8.33.26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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

func FindConfigFile(dir string) (string, error)

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

func IsConfigNotFound(err error) bool

IsConfigNotFound asserts configNotFoundError.

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func SetReviewers

func SetReviewers(path string, reviewers []string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL