Skip to content
Snippets Groups Projects
Select Git revision
21 results Searching

configuration.md

Blame
  • user avatar
    Rhys Arkins authored
    Instead refer to website and source code.
    ac686291
    History

    Configuration

    Configuration Methods

    Configuration is supported via any or all of the below:

    • Configuration file
    • Environment
    • CLI
    • renovate.json in target repository
    • renovate field of package.json in target repository

    The above are listed in reverse order of preference. i.e. package.json settings will override renovate.json settings, CLI, which overrides env, which overrides the config file, which overrides defaults.

    Default Configuration

    Default configuration values can be found in lib/config/definitions.js

    Configuration File

    You can override default configuration using a configuration file, with default name config.js in the working directory. If you need an alternate location or name, set it in the environment variable RENOVATE_CONFIG_FILE.

    Using a configuration file gives you very granular configuration options. For instance, you can override most settings at the global (file), repository, or package level. e.g. apply one set of labels for backend/package.json and a different set for frontend/package.json in the same repository.

    module.exports = {
      labels: ['upgrade'],
      depTypes: ['dependencies', 'devDependencies'],
      repositories: [
        {
          repository: 'singapore/repo1',
          packageFiles: [
            'package.json',
            {
              packageFile: 'frontend/package.json',
              labels: ['upgrade', 'frontend'],
            },
          ],
        },
        {
          repository: 'singapore/repo2',
          depTypes: [
            'dependencies',
            'devDependencies',
            {
              depType: 'optionalDependencies',
              labels: ['renovate', 'optional'],
            },
          ],
          labels: ['renovate'],
        },
        'singapore/repo3',
      ],
      packages: [
        {
          package: 'jquery',
          labels: ['jquery', 'uhoh'],
        },
      ],
    };

    CLI

    $ node renovate --help

    To configure any <list> items, separate with commas. E.g. renovate --labels=renovate,dependency.

    renovate.json

    If you add a renovate.json file to the root of your repository, you can use this to override default settings. If you leave the packageFiles field empty then renovate will still auto-discover all package.json files in the repository.

    package.json

    If you add configuration options to your package.json then these will override any other settings above. Obviously, you can't set repository or package file location with this method.

    "renovate": {
      "labels": [
        "upgrade",
        "bot"
      ]
    }

    Configuration Options

    Please see https://renovateapp.com/docs/configuration-reference/configuration-options for a list of user-facing configuration options.

    For further options when running your own instance of Renovate, please see the full config definitions file at lib/config/definitions.js.