Skip to content
Snippets Groups Projects
Select Git revision
  • 2511e4485c9b1700e031c4d6ec17b5ae93680352
  • master default
2 results
An error occurred while fetching branches. Retry the search.
An error occurred while fetching tags. Retry the search.

cluster_test.go

Blame
  • defaults.ts 613 B
    import { getOptions } from './options';
    import type { AllConfig, RenovateOptions } from './types';
    
    const defaultValues = {
      boolean: true,
      array: [],
      string: null,
      object: null,
      integer: null,
    } as const;
    
    export function getDefault(option: RenovateOptions): any {
      return option.default === undefined
        ? defaultValues[option.type]
        : option.default;
    }
    
    export function getConfig(): AllConfig {
      const options = getOptions();
      const config: AllConfig = {};
      options.forEach((option) => {
        if (!option.parent) {
          config[option.name] = getDefault(option);
        }
      });
      return config;
    }