2020-05-01 16:03:48 +00:00
import { PLATFORM_TYPE_GITHUB } from '../constants/platforms' ;
import { getManagers } from '../manager' ;
import { getPlatformList } from '../platform' ;
import { getVersioningList } from '../versioning' ;
2020-02-18 07:34:10 +00:00
import * as dockerVersioning from '../versioning/docker' ;
import * as pep440Versioning from '../versioning/pep440' ;
import * as semverVersioning from '../versioning/semver' ;
2019-01-06 13:47:42 +00:00
2020-05-01 16:03:48 +00:00
import { RenovateConfigStage } from './common' ;
2020-02-07 18:25:27 +00:00
2019-08-23 13:46:31 +00:00
export interface RenovateOptionBase {
admin? : boolean ;
2017-01-20 13:03:18 +00:00
2019-08-23 13:46:31 +00:00
allowedValues? : string [ ] ;
allowString? : boolean ;
cli? : boolean ;
description : string ;
env? : false | string ;
freeChoice? : boolean ;
mergeable? : boolean ;
2020-02-25 05:45:00 +00:00
autogenerated? : boolean ;
2019-08-23 13:46:31 +00:00
name : string ;
2020-03-06 08:07:55 +00:00
parent ? : 'hostRules' | 'packageRules' | 'postUpgradeTasks' | 'regexManagers' ;
2019-08-23 13:46:31 +00:00
// used by tests
relatedOptions? : string [ ] ;
releaseStatus ? : 'alpha' | 'beta' | 'unpublished' ;
stage? : RenovateConfigStage ;
}
2020-02-24 09:06:51 +00:00
export interface RenovateArrayOption < T extends string | object = object >
2019-08-23 13:46:31 +00:00
extends RenovateOptionBase {
2020-02-24 09:06:51 +00:00
default ? : T [ ] ;
2019-08-23 13:46:31 +00:00
mergeable? : boolean ;
type : 'array' ;
2020-02-24 09:06:51 +00:00
subType ? : 'string' | 'object' ;
2019-08-23 13:46:31 +00:00
}
export interface RenovateStringArrayOption extends RenovateArrayOption < string > {
format ? : 'regex' ;
2020-02-24 09:06:51 +00:00
subType : 'string' ;
2019-08-23 13:46:31 +00:00
}
export interface RenovateBooleanOption extends RenovateOptionBase {
default ? : boolean ;
type : 'boolean' ;
}
export interface RenovateIntegerOption extends RenovateOptionBase {
default ? : number ;
type : 'integer' ;
}
export interface RenovateStringOption extends RenovateOptionBase {
default ? : string ;
format ? : 'regex' ;
// Not used
replaceLineReturns? : boolean ;
type : 'string' ;
}
export interface RenovateObjectOption extends RenovateOptionBase {
default ? : any ;
2019-11-24 11:32:00 +00:00
additionalProperties ? : { } | boolean ;
2019-08-23 13:46:31 +00:00
mergeable? : boolean ;
type : 'object' ;
}
export type RenovateOptions =
| RenovateStringOption
| RenovateStringArrayOption
| RenovateIntegerOption
| RenovateBooleanOption
| RenovateArrayOption
| RenovateObjectOption ;
const options : RenovateOptions [ ] = [
2020-02-04 05:59:13 +00:00
{
name : 'allowedPostUpgradeCommands' ,
description :
'A list of regular expressions that determine which post-upgrade tasks are allowed. A task has to match at least one of the patterns to be allowed to run' ,
type : 'array' ,
subType : 'string' ,
default : [ ] ,
admin : true ,
} ,
{
name : 'postUpgradeTasks' ,
description :
'Post-upgrade tasks that are executed before a commit is made by Renovate' ,
type : 'object' ,
default : {
commands : [ ] ,
fileFilters : [ ] ,
} ,
} ,
{
name : 'commands' ,
description :
'A list of post-upgrade commands that are executed before a commit is made by Renovate' ,
type : 'array' ,
subType : 'string' ,
parent : 'postUpgradeTasks' ,
default : [ ] ,
cli : false ,
} ,
{
name : 'fileFilters' ,
description :
'Files that match these glob patterns will be committed if they are present after running a post-upgrade task' ,
type : 'array' ,
subType : 'string' ,
parent : 'postUpgradeTasks' ,
default : [ ] ,
cli : false ,
} ,
2019-12-05 08:39:39 +00:00
{
name : 'onboardingBranch' ,
description :
'Change this value in order to override the default onboarding branch name.' ,
type : 'string' ,
default : 'renovate/configure' ,
admin : true ,
cli : false ,
} ,
{
name : 'onboardingPrTitle' ,
description :
'Change this value in order to override the default onboarding PR title.' ,
type : 'string' ,
default : 'Configure Renovate' ,
admin : true ,
cli : false ,
} ,
2019-12-05 09:27:29 +00:00
{
name : 'productLinks' ,
description : 'Links which are embedded within PRs, issues, etc' ,
type : 'object' ,
admin : true ,
mergeable : true ,
default : {
documentation : 'https://docs.renovatebot.com/' ,
help : 'https://github.com/renovatebot/config-help/issues' ,
homepage : 'https://github.com/renovatebot/renovate' ,
} ,
additionalProperties : {
type : 'string' ,
format : 'uri' ,
} ,
} ,
2017-08-18 04:10:19 +00:00
{
name : 'extends' ,
2017-12-26 05:28:28 +00:00
description :
'Configuration presets to use/extend. Note: does not work if configured in config.js' ,
2017-08-18 04:10:19 +00:00
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2017-08-18 04:10:19 +00:00
allowString : true ,
cli : false ,
} ,
2019-02-18 21:22:33 +00:00
{
name : 'ignorePresets' ,
description :
'A list of presets to ignore, including nested ones inside `extends`' ,
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2019-02-18 21:22:33 +00:00
allowString : true ,
cli : false ,
} ,
2017-08-18 04:10:19 +00:00
{
name : 'description' ,
description : 'Plain text description for a config or preset' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2018-05-06 09:59:33 +00:00
stage : 'repository' ,
2017-08-18 04:10:19 +00:00
allowString : true ,
mergeable : true ,
cli : false ,
env : false ,
} ,
2017-01-20 13:03:18 +00:00
{
name : 'enabled' ,
2019-12-05 10:55:14 +00:00
description : ` Enable or disable the bot ` ,
2017-07-03 08:31:36 +00:00
stage : 'package' ,
2017-01-20 13:03:18 +00:00
type : 'boolean' ,
2017-07-03 09:34:46 +00:00
cli : false ,
env : false ,
} ,
2018-06-21 08:23:59 +00:00
{
name : 'force' ,
description :
'Any configuration defined within this object will force override existing settings' ,
2018-07-05 10:37:46 +00:00
stage : 'package' ,
2018-06-21 08:23:59 +00:00
admin : true ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2018-06-21 08:23:59 +00:00
cli : false ,
env : false ,
} ,
{
name : 'forceCli' ,
description :
'Whether CLI configuration options should be moved to the `force` config section' ,
stage : 'global' ,
type : 'boolean' ,
2019-04-02 09:28:03 +00:00
default : true ,
2018-06-21 08:23:59 +00:00
} ,
2018-10-26 07:48:49 +00:00
{
name : 'dryRun' ,
description :
2019-01-06 13:47:42 +00:00
'If enabled, perform a dry run by logging messages instead of creating/updating/deleting branches and PRs' ,
2018-10-26 07:48:49 +00:00
type : 'boolean' ,
admin : true ,
default : false ,
} ,
2018-12-10 07:53:55 +00:00
{
name : 'printConfig' ,
description :
2019-01-06 13:47:42 +00:00
'If enabled, log the full resolved config for each repo, including resolved presets' ,
2018-12-10 07:53:55 +00:00
type : 'boolean' ,
admin : true ,
default : false ,
} ,
2018-09-14 18:38:52 +00:00
{
name : 'binarySource' ,
2019-01-30 20:17:10 +00:00
description :
2019-12-16 16:12:53 +00:00
'Where to source binaries like `npm` and `yarn` from, choices are `auto`, `global` and `docker`' ,
2018-09-14 18:38:52 +00:00
admin : true ,
type : 'string' ,
2020-01-20 15:50:32 +00:00
allowedValues : [ 'auto' , 'global' , 'docker' ] ,
2019-12-16 16:12:53 +00:00
default : 'auto' ,
2018-09-14 18:38:52 +00:00
} ,
2020-05-25 08:23:32 +00:00
{
name : 'redisUrl' ,
description :
'If defined, this redis url will be used for caching instead of the file system' ,
admin : true ,
type : 'string' ,
} ,
2019-04-09 15:14:08 +00:00
{
name : 'baseDir' ,
description :
'The base directory for Renovate to store local files, including repository files and cache. If left empty, Renovate will create its own temporary directory to use.' ,
admin : true ,
type : 'string' ,
} ,
{
name : 'cacheDir' ,
description :
'The directory for Renovate for storing caches. If left empty, Renovate will create a subdirectory within `baseDir` to use.' ,
admin : true ,
type : 'string' ,
} ,
2019-07-30 05:43:36 +00:00
{
name : 'dockerMapDotfiles' ,
description :
'Map relevant home directory dotfiles into containers when binarySource=docker.' ,
admin : true ,
type : 'boolean' ,
default : false ,
} ,
2019-10-05 11:56:58 +00:00
{
name : 'dockerUser' ,
description :
'Specify UID and GID for docker-based binaries when binarySource=docker is used.' ,
admin : true ,
type : 'string' ,
} ,
2020-04-11 06:40:19 +00:00
{
name : 'composerIgnorePlatformReqs' ,
description :
'Enable / disable use of --ignore-platform-reqs in the composer package manager.' ,
type : 'boolean' ,
default : true ,
admin : true ,
} ,
2017-07-03 09:34:46 +00:00
// Log options
{
name : 'logLevel' ,
description : 'Logging level' ,
stage : 'global' ,
type : 'string' ,
2019-03-26 12:04:58 +00:00
allowedValues : [ 'fatal' , 'error' , 'warn' , 'info' , 'debug' , 'trace' ] ,
2017-07-03 09:34:46 +00:00
default : 'info' ,
env : 'LOG_LEVEL' ,
2017-01-20 13:03:18 +00:00
} ,
2017-06-20 19:34:25 +00:00
{
name : 'logFile' ,
description : 'Log file path' ,
2017-07-03 08:31:36 +00:00
stage : 'global' ,
2017-06-20 19:34:25 +00:00
type : 'string' ,
} ,
{
name : 'logFileLevel' ,
description : 'Log file log level' ,
2017-07-03 08:31:36 +00:00
stage : 'global' ,
2017-06-20 19:34:25 +00:00
type : 'string' ,
default : 'debug' ,
} ,
2020-02-23 06:31:13 +00:00
{
name : 'logContext' ,
description : 'Add a global or per-repo log context to each log entry.' ,
stage : 'global' ,
type : 'string' ,
default : null ,
} ,
2017-07-03 09:34:46 +00:00
// Onboarding
{
name : 'onboarding' ,
description : 'Require a Configuration PR first' ,
stage : 'repository' ,
type : 'boolean' ,
2017-12-26 04:40:14 +00:00
admin : true ,
2017-07-03 09:34:46 +00:00
} ,
2018-02-21 18:50:58 +00:00
{
name : 'onboardingConfig' ,
description : 'Configuration to use in onboarding PRs' ,
stage : 'repository' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2020-02-17 15:20:21 +00:00
default : { $schema : 'https://docs.renovatebot.com/renovate-schema.json' } ,
2018-02-21 18:50:58 +00:00
admin : true ,
mergeable : true ,
} ,
2017-11-01 10:53:18 +00:00
{
2018-12-31 05:46:00 +00:00
name : 'includeForks' ,
description :
'Whether to process forked repositories or not. By default, all forked repositories are skipped over.' ,
2017-11-01 10:53:18 +00:00
stage : 'repository' ,
type : 'boolean' ,
default : false ,
} ,
2017-12-11 18:14:51 +00:00
{
name : 'forkMode' ,
description :
2019-01-06 13:47:42 +00:00
'Set to true to fork the source repository and create branches there instead' ,
2017-12-11 18:14:51 +00:00
stage : 'repository' ,
type : 'boolean' ,
default : false ,
2017-12-26 04:40:14 +00:00
admin : true ,
2017-12-11 18:14:51 +00:00
} ,
2018-03-21 09:08:55 +00:00
{
name : 'requireConfig' ,
2019-01-06 13:47:42 +00:00
description : 'Set to true if repositories must have a config to activate.' ,
2018-03-21 09:08:55 +00:00
stage : 'repository' ,
type : 'boolean' ,
2019-04-16 08:23:37 +00:00
default : true ,
2018-03-21 09:08:55 +00:00
admin : true ,
2019-07-14 05:45:39 +00:00
} ,
{
name : 'optimizeForDisabled' ,
description :
'Set to true to first check for disabling in config before cloning' ,
stage : 'repository' ,
type : 'boolean' ,
default : false ,
admin : true ,
2018-03-21 09:08:55 +00:00
} ,
2019-04-23 14:07:27 +00:00
// Master Issue
{
name : 'masterIssue' ,
description : 'Whether to create a "Master Issue" within the repository.' ,
type : 'boolean' ,
default : false ,
} ,
{
name : 'masterIssueApproval' ,
description :
'Whether updates should require manual approval from within the Master Issue before creation.' ,
type : 'boolean' ,
default : false ,
} ,
{
name : 'masterIssueAutoclose' ,
description :
'Set to `true` and Renovate will autoclose the Master Issue if there are no updates.' ,
type : 'boolean' ,
default : false ,
} ,
{
name : 'masterIssueTitle' ,
description : 'Title to use for the Master Issue' ,
type : 'string' ,
2019-12-05 10:55:14 +00:00
default : ` Update Dependencies (Renovate Bot) ` ,
2019-04-23 14:07:27 +00:00
} ,
2019-08-15 05:41:01 +00:00
{
name : 'configWarningReuseIssue' ,
description :
'Set this to false and Renovate will open each config warning in a new issue instead of reopening/reusing an existing issue.' ,
type : 'boolean' ,
default : true ,
} ,
2017-09-01 04:45:51 +00:00
// encryption
{
name : 'privateKey' ,
description : 'Server-side private key' ,
stage : 'repository' ,
type : 'string' ,
replaceLineReturns : true ,
2017-12-26 04:40:14 +00:00
admin : true ,
2017-09-01 04:45:51 +00:00
} ,
{
name : 'encrypted' ,
description :
2019-01-06 13:47:42 +00:00
'A configuration object containing configuration encrypted with project key.' ,
2017-09-01 04:45:51 +00:00
stage : 'repository' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2017-09-01 04:45:51 +00:00
default : null ,
} ,
2017-07-03 09:34:46 +00:00
// Scheduling
2017-06-30 12:04:46 +00:00
{
name : 'timezone' ,
description :
'[IANA Time Zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)' ,
type : 'string' ,
} ,
{
name : 'schedule' ,
2019-01-06 13:47:42 +00:00
description : 'Times of day/week to limit branch creation to' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2017-08-11 05:29:16 +00:00
allowString : true ,
2018-06-21 08:23:59 +00:00
cli : true ,
2017-07-03 09:34:46 +00:00
env : false ,
2020-02-24 09:06:51 +00:00
default : [ 'at any time' ] ,
2017-06-30 12:04:46 +00:00
} ,
2017-10-13 04:42:17 +00:00
{
name : 'updateNotScheduled' ,
description :
'Whether to update (but not create) branches when not scheduled' ,
stage : 'branch' ,
type : 'boolean' ,
} ,
2018-01-25 09:38:30 +00:00
// Bot administration
2019-04-09 15:14:08 +00:00
{
name : 'persistRepoData' ,
description :
2019-10-29 06:19:51 +00:00
'If set to true, repository data will preserved between runs instead of deleted.' ,
2019-04-09 15:14:08 +00:00
type : 'boolean' ,
admin : true ,
default : false ,
} ,
2018-01-25 09:38:30 +00:00
{
2018-11-16 11:16:37 +00:00
name : 'trustLevel' ,
2018-01-25 09:38:30 +00:00
description :
2018-11-16 11:16:37 +00:00
'Set this to "high" if the bot should trust the repository owners/contents' ,
2018-01-25 09:38:30 +00:00
stage : 'global' ,
2018-11-16 11:16:37 +00:00
type : 'string' ,
default : 'low' ,
2018-01-25 09:38:30 +00:00
} ,
2019-12-11 11:59:03 +00:00
{
name : 'ignoreScripts' ,
description :
'Configure this to true if trustLevel is high but you wish to skip running scripts when updating lock files' ,
type : 'boolean' ,
default : false ,
} ,
2017-01-31 17:16:33 +00:00
{
name : 'platform' ,
description : 'Platform type of repository' ,
type : 'string' ,
2020-04-08 07:14:32 +00:00
allowedValues : getPlatformList ( ) ,
2020-01-17 07:26:42 +00:00
default : PLATFORM_TYPE_GITHUB ,
2017-12-26 04:40:14 +00:00
admin : true ,
2017-01-31 17:16:33 +00:00
} ,
2017-02-05 08:10:29 +00:00
{
name : 'endpoint' ,
description : 'Custom endpoint to use' ,
type : 'string' ,
2017-12-26 04:40:14 +00:00
admin : true ,
2018-02-03 06:23:24 +00:00
default : null ,
2017-02-05 08:10:29 +00:00
} ,
2017-01-20 13:03:18 +00:00
{
name : 'token' ,
2017-01-31 17:16:33 +00:00
description : 'Repository Auth Token' ,
2017-07-03 08:31:36 +00:00
stage : 'repository' ,
2017-01-20 13:03:18 +00:00
type : 'string' ,
2017-12-26 04:40:14 +00:00
admin : true ,
2017-01-20 13:03:18 +00:00
} ,
2018-08-29 05:30:03 +00:00
{
name : 'username' ,
description : 'Username for authentication. Currently Bitbucket only' ,
stage : 'repository' ,
type : 'string' ,
admin : true ,
} ,
{
name : 'password' ,
description :
'Password for authentication. Currently Bitbucket only (AppPassword).' ,
stage : 'repository' ,
type : 'string' ,
admin : true ,
} ,
2017-08-29 07:25:44 +00:00
{
name : 'npmrc' ,
description : 'String copy of npmrc file. Use \\n instead of line breaks' ,
stage : 'branch' ,
type : 'string' ,
} ,
2017-12-26 04:40:14 +00:00
{
name : 'npmToken' ,
2018-10-15 13:47:48 +00:00
description : 'npm token used for authenticating with the default registry' ,
2017-12-26 04:40:14 +00:00
stage : 'branch' ,
type : 'string' ,
} ,
2017-08-29 07:25:44 +00:00
{
name : 'yarnrc' ,
description : 'String copy of yarnrc file. Use \\n instead of line breaks' ,
stage : 'branch' ,
type : 'string' ,
} ,
2018-03-22 09:41:26 +00:00
{
name : 'updateLockFiles' ,
description : 'Set to false to disable lock file updating' ,
type : 'boolean' ,
} ,
2018-08-15 15:13:07 +00:00
{
name : 'skipInstalls' ,
description :
'Skip installing modules/dependencies if lock file updating is possible alone' ,
type : 'boolean' ,
2018-10-12 18:00:49 +00:00
default : null ,
2018-08-15 15:13:07 +00:00
admin : true ,
} ,
2017-09-29 06:22:22 +00:00
{
name : 'ignoreNpmrcFile' ,
description : 'Whether to ignore any .npmrc file found in repository' ,
type : 'boolean' ,
default : false ,
} ,
2017-08-29 07:25:44 +00:00
{
name : 'autodiscover' ,
description : 'Autodiscover all repositories' ,
2017-12-26 04:40:14 +00:00
stage : 'global' ,
2017-08-29 07:25:44 +00:00
type : 'boolean' ,
default : false ,
} ,
2019-03-17 05:49:39 +00:00
{
name : 'autodiscoverFilter' ,
description : 'Filter the list of autodiscovered repositories' ,
stage : 'global' ,
type : 'string' ,
default : null ,
} ,
2019-10-14 11:15:37 +00:00
{
name : 'prCommitsPerRunLimit' ,
description :
'Set a maximum number of commits per Renovate run. Default is no limit.' ,
stage : 'global' ,
type : 'integer' ,
default : 0 ,
} ,
2017-01-20 13:03:18 +00:00
{
name : 'repositories' ,
2017-03-13 09:07:57 +00:00
description : 'List of Repositories' ,
2017-07-03 08:31:36 +00:00
stage : 'global' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2017-01-20 13:03:18 +00:00
cli : false ,
} ,
2017-07-06 08:26:18 +00:00
{
2018-01-12 06:47:18 +00:00
name : 'baseBranches' ,
2017-07-06 08:26:18 +00:00
description :
2019-01-06 13:47:42 +00:00
'An array of one or more custom base branches to be processed. If left empty, the default branch will be chosen' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2017-07-06 08:26:18 +00:00
cli : false ,
env : false ,
} ,
2017-12-09 16:09:31 +00:00
{
name : 'gitAuthor' ,
description : 'Author to use for git commits. RFC5322' ,
type : 'string' ,
2018-06-25 13:52:24 +00:00
admin : true ,
2017-12-09 16:09:31 +00:00
} ,
2017-12-09 16:56:23 +00:00
{
name : 'gitPrivateKey' ,
description : 'PGP key to use for signing git commits' ,
type : 'string' ,
cli : false ,
2017-12-26 04:40:14 +00:00
admin : true ,
2017-12-09 16:56:23 +00:00
} ,
2018-03-30 15:00:51 +00:00
{
name : 'enabledManagers' ,
description :
'A list of package managers to enable. If defined, then all managers not on the list are disabled.' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2018-03-30 15:00:51 +00:00
stage : 'repository' ,
} ,
2018-04-30 14:13:32 +00:00
{
name : 'includePaths' ,
description : 'Include package files only within these defined paths' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 07:22:19 +00:00
subType : 'string' ,
2018-04-30 14:13:32 +00:00
stage : 'repository' ,
default : [ ] ,
} ,
2017-07-08 05:00:58 +00:00
{
2017-08-26 19:28:29 +00:00
name : 'ignorePaths' ,
2017-11-01 09:31:56 +00:00
description :
2019-04-30 05:47:20 +00:00
'Skip any package file whose path matches one of these. Can be string or glob pattern' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 07:22:19 +00:00
subType : 'string' ,
2017-07-08 05:00:58 +00:00
stage : 'repository' ,
2017-12-14 05:35:12 +00:00
default : [ '**/node_modules/**' , '**/bower_components/**' ] ,
2017-07-08 05:00:58 +00:00
} ,
2019-04-30 06:52:01 +00:00
{
name : 'excludeCommitPaths' ,
description :
'A file that matches any of these glob patterns will not be committed, even if it has been updated.' ,
type : 'array' ,
subType : 'string' ,
default : [ ] ,
} ,
2019-11-24 11:32:00 +00:00
{
name : 'aliases' ,
description : 'Aliases for registries, package manager specific' ,
type : 'object' ,
default : { } ,
additionalProperties : {
type : 'string' ,
format : 'uri' ,
} ,
} ,
2018-07-05 09:33:50 +00:00
{
name : 'registryUrls' ,
description :
'List of URLs to try for dependency lookup. Package manager-specific' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 07:22:19 +00:00
subType : 'string' ,
2018-07-05 09:33:50 +00:00
default : null ,
2018-10-16 02:52:57 +00:00
stage : 'branch' ,
2018-07-05 09:33:50 +00:00
cli : false ,
env : false ,
} ,
2018-12-13 04:29:11 +00:00
{
2020-02-18 07:34:10 +00:00
name : 'versioning' ,
description : 'versioning to use for filtering and comparisons' ,
2018-12-13 04:29:11 +00:00
type : 'string' ,
2020-02-18 07:34:10 +00:00
allowedValues : getVersioningList ( ) ,
default : semverVersioning . id ,
2018-12-13 04:29:11 +00:00
cli : false ,
env : false ,
} ,
2019-05-13 14:19:31 +00:00
{
name : 'azureAutoComplete' ,
description :
'If set to true, Azure DevOps PRs will be set to auto-complete after all (if any) branch policies have been met' ,
type : 'boolean' ,
default : false ,
} ,
2019-04-15 12:57:54 +00:00
{
name : 'azureWorkItemId' ,
description :
'The id of an existing work item on Azure Boards to link to each PR' ,
type : 'integer' ,
default : 0 ,
} ,
2017-06-27 11:44:03 +00:00
// depType
{
name : 'ignoreDeps' ,
description : 'Dependencies to ignore' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 07:22:19 +00:00
subType : 'string' ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2018-05-03 12:14:05 +00:00
mergeable : true ,
2017-06-27 11:44:03 +00:00
} ,
{
2017-08-03 05:55:59 +00:00
name : 'packageRules' ,
description : 'Rules for matching package names' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2018-12-11 11:55:12 +00:00
mergeable : true ,
cli : false ,
env : false ,
} ,
{
name : 'languages' ,
description :
2019-03-09 06:10:50 +00:00
'List of languages to match (e.g. ["python"]). Valid only within `packageRules` object' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2018-12-11 11:55:12 +00:00
allowString : true ,
parent : 'packageRules' ,
stage : 'package' ,
2017-08-06 04:41:45 +00:00
mergeable : true ,
2017-06-27 11:44:03 +00:00
cli : false ,
env : false ,
} ,
2019-03-11 16:42:30 +00:00
{
name : 'baseBranchList' ,
description :
'List of branches to match (e.g. ["master"]). Valid only within `packageRules` object' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2019-03-11 16:42:30 +00:00
allowString : true ,
parent : 'packageRules' ,
stage : 'package' ,
mergeable : true ,
cli : false ,
env : false ,
} ,
2018-12-11 11:37:13 +00:00
{
name : 'managers' ,
description :
'List of package managers to match (e.g. ["pipenv"]). Valid only within `packageRules` object' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2018-12-11 11:37:13 +00:00
allowString : true ,
parent : 'packageRules' ,
stage : 'package' ,
mergeable : true ,
cli : false ,
env : false ,
} ,
2019-03-12 06:27:49 +00:00
{
name : 'datasources' ,
description :
'List of datasources to match (e.g. ["orb"]). Valid only within `packageRules` object' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2019-03-12 06:27:49 +00:00
allowString : true ,
parent : 'packageRules' ,
stage : 'package' ,
mergeable : true ,
cli : false ,
env : false ,
} ,
2018-04-09 14:10:34 +00:00
{
name : 'depTypeList' ,
description :
'List of depTypes to match (e.g. [`peerDependencies`]). Valid only within `packageRules` object' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2018-04-09 14:10:34 +00:00
allowString : true ,
2018-05-06 06:29:38 +00:00
parent : 'packageRules' ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2018-04-09 14:10:34 +00:00
mergeable : true ,
cli : false ,
env : false ,
} ,
2017-08-02 05:52:28 +00:00
{
2017-08-03 05:55:59 +00:00
name : 'packageNames' ,
description :
'Package names to match. Valid only within `packageRules` object' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2017-08-11 05:29:16 +00:00
allowString : true ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2018-05-06 06:29:38 +00:00
parent : 'packageRules' ,
2017-08-18 04:10:19 +00:00
mergeable : true ,
2017-08-02 05:52:28 +00:00
cli : false ,
env : false ,
} ,
{
2017-08-03 05:55:59 +00:00
name : 'excludePackageNames' ,
2017-08-02 05:52:28 +00:00
description :
2017-08-03 05:55:59 +00:00
'Package names to exclude. Valid only within `packageRules` object' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2017-08-11 05:29:16 +00:00
allowString : true ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2018-05-06 06:29:38 +00:00
parent : 'packageRules' ,
2017-08-18 04:10:19 +00:00
mergeable : true ,
2017-08-03 05:55:59 +00:00
cli : false ,
env : false ,
} ,
{
name : 'packagePatterns' ,
description :
'Package name patterns to match. Valid only within `packageRules` object.' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2019-03-23 07:27:46 +00:00
format : 'regex' ,
2017-08-11 05:29:16 +00:00
allowString : true ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2018-05-06 06:29:38 +00:00
parent : 'packageRules' ,
2017-08-18 04:10:19 +00:00
mergeable : true ,
2017-08-03 05:55:59 +00:00
cli : false ,
env : false ,
} ,
{
name : 'excludePackagePatterns' ,
description :
'Package name patterns to exclude. Valid only within `packageRules` object.' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2019-03-23 07:27:46 +00:00
format : 'regex' ,
2017-08-11 05:29:16 +00:00
allowString : true ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2018-05-06 06:29:38 +00:00
parent : 'packageRules' ,
2017-08-18 04:10:19 +00:00
mergeable : true ,
2017-08-02 05:52:28 +00:00
cli : false ,
env : false ,
} ,
2018-04-27 03:45:22 +00:00
{
name : 'matchCurrentVersion' ,
description :
'A version or version range to match against the current version of a package. Valid only within `packageRules` object' ,
type : 'string' ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2018-05-06 06:29:38 +00:00
parent : 'packageRules' ,
2018-04-27 03:45:22 +00:00
mergeable : true ,
cli : false ,
env : false ,
} ,
2018-12-11 11:03:09 +00:00
{
name : 'sourceUrlPrefixes' ,
description :
'A list of source URL prefixes to match against, commonly used for grouping of monorepos or packages from the same organization.' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2018-12-11 11:03:09 +00:00
allowString : true ,
stage : 'package' ,
parent : 'packageRules' ,
mergeable : true ,
cli : false ,
env : false ,
} ,
2018-07-04 07:30:29 +00:00
{
name : 'updateTypes' ,
description :
'Update types to match against (major, minor, pin, etc). Valid only within `packageRules` object.' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
// TODO: add allowedValues
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2019-03-23 07:50:48 +00:00
allowedValues : [
'major' ,
'minor' ,
'patch' ,
'pin' ,
'digest' ,
'lockFileMaintenance' ,
'rollback' ,
'bump' ,
] ,
2018-07-04 07:30:29 +00:00
allowString : true ,
stage : 'package' ,
parent : 'packageRules' ,
mergeable : true ,
cli : false ,
env : false ,
} ,
2018-08-24 15:08:32 +00:00
{
name : 'paths' ,
description :
'List of strings or glob patterns to match against package files. Applicable inside packageRules only' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 07:22:19 +00:00
subType : 'string' ,
2018-08-24 15:08:32 +00:00
stage : 'repository' ,
parent : 'packageRules' ,
cli : false ,
env : false ,
} ,
2017-01-20 13:03:18 +00:00
// Version behaviour
2018-03-02 22:10:42 +00:00
{
name : 'allowedVersions' ,
description : 'A semver range defining allowed versions for dependencies' ,
type : 'string' ,
2018-05-06 06:29:38 +00:00
parent : 'packageRules' ,
2018-03-02 22:10:42 +00:00
stage : 'package' ,
cli : false ,
env : false ,
} ,
2017-10-24 03:33:03 +00:00
{
name : 'pinDigests' ,
description : 'Whether to add digests to Dockerfile source images' ,
type : 'boolean' ,
2018-06-26 11:31:51 +00:00
default : false ,
2017-10-24 03:33:03 +00:00
} ,
2017-04-15 10:44:50 +00:00
{
2018-05-17 05:36:13 +00:00
name : 'separateMajorMinor' ,
2017-06-02 20:40:00 +00:00
description :
'If set to false, it will upgrade dependencies to latest release only, and not separate major/minor branches' ,
2017-04-15 10:44:50 +00:00
type : 'boolean' ,
} ,
2017-11-10 03:57:07 +00:00
{
2018-05-17 05:33:59 +00:00
name : 'separateMultipleMajor' ,
2017-11-10 03:57:07 +00:00
description :
'If set to true, PRs will be raised separately for each available major upgrade version' ,
stage : 'package' ,
type : 'boolean' ,
default : false ,
} ,
2017-08-01 15:10:53 +00:00
{
2018-05-17 05:40:29 +00:00
name : 'separateMinorPatch' ,
2017-08-01 15:10:53 +00:00
description :
'If set to true, it will separate minor and patch updates into separate branches' ,
type : 'boolean' ,
default : false ,
} ,
2017-01-20 13:03:18 +00:00
{
name : 'ignoreUnstable' ,
description : 'Ignore versions with unstable semver' ,
2017-07-03 08:31:36 +00:00
stage : 'package' ,
2017-01-20 13:03:18 +00:00
type : 'boolean' ,
} ,
2018-07-05 13:10:50 +00:00
{
name : 'ignoreDeprecated' ,
description :
'Ignore deprecated versions unless the current version is deprecated' ,
stage : 'package' ,
type : 'boolean' ,
default : true ,
} ,
2018-09-19 07:59:33 +00:00
{
name : 'followTag' ,
description : 'If defined, packages will follow this release tag exactly.' ,
stage : 'package' ,
type : 'string' ,
cli : false ,
env : false ,
} ,
2017-01-20 13:03:18 +00:00
{
name : 'respectLatest' ,
description : 'Ignore versions newer than npm "latest" version' ,
2017-07-03 08:31:36 +00:00
stage : 'package' ,
2017-01-20 13:03:18 +00:00
type : 'boolean' ,
} ,
2018-03-07 06:41:10 +00:00
{
feat: rangeStrategy (#1954)
This PR replaces the existing `pinVersions`, `upgradeInRange` and `versionStrategy` settings with a single one: `rangeStrategy`.
Previously:
- `pinVersions` could be `true` or `false`, but defaulted to `null`, which meant that Renovate would decide. `true` meant that Renovate would replace existing ranges like `^1.0.0` with an exact/pinned version such as `1.2.0`.
- `upgradeInRange` could be true or false, default to false. If `true`, it would mean Renovate would replace an existing range like `^1.0.0` with something like `^1.2.0`
- `versionStrategy` could be `replace` or `widen` and was mainly used for `peerDependencies` to widen existing ranges, e.g. from `^1.0.0` to `^1.0.0 || ^2.0.0`
It was possible to set conflicting settings, e.g. configuring `pinVersions=true` and `upgradeInRange=true`.
Now, we combine them into a single setting: `rangeStrategy`:
- `auto` = Renovate decides (this will be done on a manager-by-manager basis)
- `pin` = convert ranges to exact versions
- `bump` = same as `upgradeInRange` previously, e.g. bump the range even if the new version satisifies the existing range
- `replace` = Same as pinVersions === false && upgradeInRange === false, i.e. only replace the range if the new version falls outside it
- `widen` = Same as previous versionStrategy==='widen'
2018-05-17 05:16:13 +00:00
name : 'rangeStrategy' ,
description : 'Policy for how to modify/update existing ranges.' ,
2018-01-24 14:26:37 +00:00
type : 'string' ,
2018-05-23 09:17:20 +00:00
default : 'replace' ,
2019-01-24 05:23:08 +00:00
allowedValues : [
'auto' ,
'pin' ,
'bump' ,
'replace' ,
'widen' ,
'update-lockfile' ,
] ,
2018-01-24 14:26:37 +00:00
cli : false ,
env : false ,
} ,
2017-08-04 06:32:22 +00:00
{
name : 'branchPrefix' ,
description : 'Prefix to use for all branch names' ,
stage : 'branch' ,
type : 'string' ,
2019-12-05 09:45:28 +00:00
default : ` renovate/ ` ,
2017-08-04 06:32:22 +00:00
} ,
2018-01-20 08:27:05 +00:00
{
name : 'bumpVersion' ,
description : 'Bump the version in the package.json being updated' ,
type : 'string' ,
2019-03-23 07:50:48 +00:00
allowedValues : [ 'major' , 'minor' , 'patch' ] ,
2018-01-20 08:27:05 +00:00
} ,
2017-08-01 15:10:53 +00:00
// Major/Minor/Patch
{
name : 'major' ,
description : 'Configuration to apply when an update type is major' ,
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2017-08-01 15:10:53 +00:00
default : { } ,
cli : false ,
mergeable : true ,
} ,
{
name : 'minor' ,
description : 'Configuration to apply when an update type is minor' ,
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2017-08-01 15:10:53 +00:00
default : { } ,
cli : false ,
mergeable : true ,
} ,
{
name : 'patch' ,
description :
2018-05-17 05:40:29 +00:00
'Configuration to apply when an update type is patch. Only applies if `separateMinorPatch` is set to true' ,
2017-08-01 15:10:53 +00:00
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2018-07-05 16:21:43 +00:00
default : { } ,
2017-08-01 15:10:53 +00:00
cli : false ,
mergeable : true ,
} ,
2017-09-13 18:52:07 +00:00
{
name : 'pin' ,
description : 'Configuration to apply when an update type is pin.' ,
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2017-09-13 18:52:07 +00:00
default : {
2018-07-05 20:08:19 +00:00
unpublishSafe : false ,
recreateClosed : true ,
2020-02-22 15:31:50 +00:00
rebaseWhen : 'behind-base-branch' ,
2018-07-05 20:08:19 +00:00
groupName : 'Pin Dependencies' ,
2019-05-30 05:49:35 +00:00
groupSlug : 'pin-dependencies' ,
2018-07-05 20:08:19 +00:00
commitMessageAction : 'Pin' ,
group : {
commitMessageTopic : 'dependencies' ,
2018-10-14 19:56:42 +00:00
commitMessageExtra : '' ,
2017-09-13 18:52:07 +00:00
} ,
} ,
cli : false ,
mergeable : true ,
} ,
2017-10-25 07:57:57 +00:00
{
name : 'digest' ,
description :
2018-10-08 10:08:51 +00:00
'Configuration to apply when updating a digest (no change in tag/version)' ,
2017-10-25 07:57:57 +00:00
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2018-09-17 09:18:18 +00:00
default : {
branchTopic : '{{{depNameSanitized}}}-digest' ,
commitMessageExtra : 'to {{newDigestShort}}' ,
commitMessageTopic : '{{{depName}}} commit hash' ,
} ,
2017-10-25 07:57:57 +00:00
cli : false ,
mergeable : true ,
} ,
2017-06-29 17:50:26 +00:00
// Semantic commit / Semantic release
{
2017-06-30 04:01:50 +00:00
name : 'semanticCommits' ,
2017-06-29 17:50:26 +00:00
description : 'Enable semantic commit prefixes for commits and PR titles' ,
type : 'boolean' ,
2017-08-10 20:35:05 +00:00
default : null ,
2017-06-29 17:50:26 +00:00
} ,
{
2017-11-24 06:14:58 +00:00
name : 'semanticCommitType' ,
description : 'Commit type to use if semantic commits is enabled' ,
2017-06-29 17:50:26 +00:00
type : 'string' ,
2017-11-24 06:14:58 +00:00
default : 'chore' ,
} ,
{
name : 'semanticCommitScope' ,
2017-12-26 04:40:14 +00:00
description : 'Commit scope to use if semantic commits are enabled' ,
2017-11-24 06:14:58 +00:00
type : 'string' ,
default : 'deps' ,
2017-06-29 17:50:26 +00:00
} ,
2017-01-20 13:03:18 +00:00
// PR Behaviour
2018-07-22 04:49:04 +00:00
{
name : 'rollbackPrs' ,
description :
'Create PRs to roll back versions if the current version is not found in the registry' ,
type : 'boolean' ,
2019-01-25 05:36:27 +00:00
default : false ,
2018-07-22 04:49:04 +00:00
} ,
2017-01-20 13:03:18 +00:00
{
name : 'recreateClosed' ,
description : 'Recreate PRs even if same ones were closed previously' ,
type : 'boolean' ,
default : false ,
} ,
2019-08-14 03:59:14 +00:00
{
2020-02-22 15:31:50 +00:00
name : 'rebaseWhen' ,
description : 'Control when Renovate decides to rebase an existing branch' ,
type : 'string' ,
allowedValues : [ 'auto' , 'never' , 'conflicted' , 'behind-base-branch' ] ,
default : 'auto' ,
2017-02-06 06:56:33 +00:00
} ,
2018-09-14 10:51:33 +00:00
{
name : 'rebaseLabel' ,
2019-08-13 07:54:03 +00:00
description : 'Label to use to request the bot to rebase a PR manually' ,
2018-09-14 10:51:33 +00:00
type : 'string' ,
default : 'rebase' ,
} ,
2018-01-25 12:36:21 +00:00
{
name : 'statusCheckVerify' ,
2019-01-06 13:47:42 +00:00
description : 'Set a verify status check for all PRs' ,
2018-01-25 12:36:21 +00:00
type : 'boolean' ,
default : false ,
} ,
2017-08-06 13:38:10 +00:00
{
name : 'unpublishSafe' ,
description : 'Set a status check for unpublish-safe upgrades' ,
type : 'boolean' ,
2017-08-14 04:27:00 +00:00
default : false ,
2017-08-06 13:38:10 +00:00
} ,
2019-08-26 08:32:59 +00:00
{
name : 'stabilityDays' ,
description :
'Number of days required before a new release is considered to be stabilized.' ,
type : 'integer' ,
default : 0 ,
} ,
2017-04-17 04:46:24 +00:00
{
name : 'prCreation' ,
2019-03-23 07:50:48 +00:00
description : 'When to create the PR for a branch.' ,
2017-04-17 04:46:24 +00:00
type : 'string' ,
2019-07-11 11:48:41 +00:00
allowedValues : [ 'immediate' , 'not-pending' , 'status-success' , 'approval' ] ,
2017-04-17 04:46:24 +00:00
default : 'immediate' ,
} ,
2017-08-28 09:37:09 +00:00
{
name : 'prNotPendingHours' ,
description : 'Timeout in hours for when prCreation=not-pending' ,
type : 'integer' ,
2017-12-20 05:47:20 +00:00
// Must be at least 24 hours to give time for the unpublishSafe check to "complete".
2018-02-12 06:55:08 +00:00
default : 25 ,
2017-08-28 09:37:09 +00:00
} ,
2018-01-11 10:49:01 +00:00
{
name : 'prHourlyLimit' ,
description :
'Rate limit PRs to maximum x created per hour. 0 (default) means no limit.' ,
type : 'integer' ,
default : 0 , // no limit
} ,
2018-01-30 10:38:55 +00:00
{
name : 'prConcurrentLimit' ,
description :
'Limit to a maximum of x concurrent branches/PRs. 0 (default) means no limit.' ,
type : 'integer' ,
default : 0 , // no limit
} ,
2019-09-03 13:52:53 +00:00
{
name : 'prPriority' ,
description :
'Set sorting priority for PR creation. PRs with higher priority are created first, negative priority last.' ,
type : 'integer' ,
default : 0 ,
cli : false ,
env : false ,
} ,
2019-05-10 11:28:35 +00:00
{
name : 'bbUseDefaultReviewers' ,
2019-09-17 07:48:16 +00:00
description : 'Use the default reviewers (Bitbucket only).' ,
2019-05-10 11:28:35 +00:00
type : 'boolean' ,
default : true ,
} ,
2017-04-20 11:01:23 +00:00
// Automatic merging
{
name : 'automerge' ,
2017-06-02 20:40:00 +00:00
description :
2017-08-21 11:41:48 +00:00
'Whether to automerge branches/PRs automatically, without human intervention' ,
type : 'boolean' ,
default : false ,
2017-04-20 11:01:23 +00:00
} ,
2017-06-08 04:18:21 +00:00
{
name : 'automergeType' ,
2019-03-23 07:50:48 +00:00
description : 'How to automerge, if enabled.' ,
2017-06-08 04:18:21 +00:00
type : 'string' ,
2019-03-23 07:50:48 +00:00
allowedValues : [ 'branch' , 'pr' , 'pr-comment' ] ,
2017-06-08 04:18:21 +00:00
default : 'pr' ,
} ,
2018-05-04 04:55:01 +00:00
{
name : 'automergeComment' ,
description :
'PR comment to add to trigger automerge. Used only if automergeType=pr-comment' ,
type : 'string' ,
default : 'automergeComment' ,
} ,
2017-07-05 05:02:25 +00:00
{
name : 'requiredStatusChecks' ,
description :
'List of status checks that must pass before automerging. Set to null to enable automerging without tests.' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 07:22:19 +00:00
subType : 'string' ,
2017-07-05 05:02:25 +00:00
cli : false ,
env : false ,
} ,
2018-07-29 04:35:25 +00:00
{
name : 'vulnerabilityAlerts' ,
description :
2019-01-06 13:47:42 +00:00
'Config to apply when a PR is necessary due to vulnerability of existing package version.' ,
2018-07-29 04:35:25 +00:00
type : 'object' ,
default : {
groupName : null ,
schedule : [ ] ,
2018-10-04 08:07:59 +00:00
masterIssueApproval : false ,
2019-03-08 07:18:30 +00:00
rangeStrategy : 'update-lockfile' ,
2018-07-29 04:35:25 +00:00
commitMessageSuffix : '[SECURITY]' ,
} ,
cli : false ,
env : false ,
} ,
2017-07-01 04:48:38 +00:00
// Default templates
2017-01-20 13:03:18 +00:00
{
name : 'branchName' ,
description : 'Branch name template' ,
type : 'string' ,
2018-04-17 06:39:26 +00:00
default : '{{{branchPrefix}}}{{{managerBranchPrefix}}}{{{branchTopic}}}' ,
cli : false ,
} ,
{
name : 'managerBranchPrefix' ,
description : 'Branch manager prefix' ,
type : 'string' ,
default : '' ,
cli : false ,
} ,
{
name : 'branchTopic' ,
description : 'Branch topic' ,
type : 'string' ,
2018-07-05 16:21:43 +00:00
default :
2019-01-24 05:23:08 +00:00
'{{{depNameSanitized}}}-{{{newMajor}}}{{#if isPatch}}.{{{newMinor}}}{{/if}}.x{{#if isLockfileUpdate}}-lockfile{{/if}}' ,
2017-01-20 13:03:18 +00:00
cli : false ,
} ,
{
name : 'commitMessage' ,
2018-04-17 06:39:26 +00:00
description : 'Message to use for commit messages and pull request titles' ,
2017-01-20 13:03:18 +00:00
type : 'string' ,
2018-04-17 06:39:26 +00:00
default :
2018-04-17 10:49:59 +00:00
'{{{commitMessagePrefix}}} {{{commitMessageAction}}} {{{commitMessageTopic}}} {{{commitMessageExtra}}} {{{commitMessageSuffix}}}' ,
2017-01-20 13:03:18 +00:00
cli : false ,
} ,
2017-12-25 19:37:14 +00:00
{
name : 'commitBody' ,
description :
'Commit message body template. Will be appended to commit message, separated by two line returns.' ,
type : 'string' ,
cli : false ,
} ,
2019-06-02 08:50:35 +00:00
{
name : 'commitBodyTable' ,
description :
'If enabled, append a table in the commit message body describing all updates in the commit' ,
type : 'boolean' ,
default : false ,
} ,
2018-04-17 06:39:26 +00:00
{
name : 'commitMessagePrefix' ,
description :
'Prefix to add to start of commit messages and PR titles. Uses a semantic prefix if semanticCommits enabled' ,
type : 'string' ,
cli : false ,
} ,
{
name : 'commitMessageAction' ,
description : 'Action verb to use in commit messages and PR titles' ,
type : 'string' ,
default : 'Update' ,
cli : false ,
} ,
{
name : 'commitMessageTopic' ,
description : 'The upgrade topic/noun used in commit messages and PR titles' ,
type : 'string' ,
default : 'dependency {{depName}}' ,
cli : false ,
} ,
{
name : 'commitMessageExtra' ,
description :
'Extra description used after the commit message topic - typically the version' ,
type : 'string' ,
default :
2018-07-05 19:11:58 +00:00
'to {{#if isMajor}}v{{{newMajor}}}{{else}}{{#if isSingleVersion}}v{{{toVersion}}}{{else}}{{{newValue}}}{{/if}}{{/if}}' ,
2018-04-17 06:39:26 +00:00
cli : false ,
} ,
2018-07-28 18:43:54 +00:00
{
name : 'commitMessageSuffix' ,
description : 'Suffix to add to end of commit messages and PR titles.' ,
type : 'string' ,
cli : false ,
} ,
2017-01-20 13:03:18 +00:00
{
name : 'prTitle' ,
2018-04-17 06:39:26 +00:00
description :
'Pull Request title template (deprecated). Now uses commitMessage.' ,
2017-01-20 13:03:18 +00:00
type : 'string' ,
2018-04-17 06:39:26 +00:00
default : null ,
2017-01-20 13:03:18 +00:00
cli : false ,
} ,
2018-03-12 12:35:15 +00:00
{
name : 'prFooter' ,
description : 'Pull Request footer template' ,
type : 'string' ,
2019-12-05 09:27:29 +00:00
default : ` This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). ` ,
2018-03-12 12:35:15 +00:00
stage : 'global' ,
} ,
2017-04-13 20:39:46 +00:00
{
2017-07-01 04:44:41 +00:00
name : 'lockFileMaintenance' ,
description : 'Configuration for lock file maintenance' ,
2018-05-06 09:59:33 +00:00
stage : 'branch' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2017-07-01 04:44:41 +00:00
default : {
2017-11-01 08:45:30 +00:00
enabled : false ,
2017-07-02 04:21:24 +00:00
recreateClosed : true ,
2018-03-20 05:48:27 +00:00
rebaseStalePrs : true ,
2018-04-17 06:39:26 +00:00
branchTopic : 'lock-file-maintenance' ,
2018-04-17 10:22:11 +00:00
commitMessageAction : 'Lock file maintenance' ,
commitMessageTopic : null ,
commitMessageExtra : null ,
2017-08-02 14:14:09 +00:00
schedule : [ 'before 5am on monday' ] ,
2017-10-05 09:07:15 +00:00
groupName : null ,
2019-06-11 10:11:57 +00:00
prBodyDefinitions : {
Change : 'All locks refreshed' ,
} ,
2017-07-01 04:44:41 +00:00
} ,
2017-04-13 20:39:46 +00:00
cli : false ,
2017-07-01 04:44:41 +00:00
mergeable : true ,
2017-04-13 20:39:46 +00:00
} ,
2017-04-15 20:04:14 +00:00
// Dependency Groups
2017-06-03 13:27:11 +00:00
{
name : 'lazyGrouping' ,
description : 'Use group names only when multiple dependencies upgraded' ,
type : 'boolean' ,
default : true ,
} ,
2017-04-15 20:04:14 +00:00
{
name : 'groupName' ,
description : 'Human understandable name for the dependency group' ,
type : 'string' ,
default : null ,
} ,
{
name : 'groupSlug' ,
2017-06-02 20:40:00 +00:00
description :
'Slug to use for group (e.g. in branch name). Will be calculated from groupName if null' ,
2017-04-15 20:04:14 +00:00
type : 'string' ,
default : null ,
2017-07-03 09:34:46 +00:00
cli : false ,
env : false ,
2017-04-15 20:04:14 +00:00
} ,
{
2017-07-01 04:48:38 +00:00
name : 'group' ,
description : 'Config if groupName is enabled' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2017-07-01 04:48:38 +00:00
default : {
2018-04-17 10:49:59 +00:00
branchTopic : '{{{groupSlug}}}' ,
commitMessageTopic : '{{{groupName}}}' ,
2017-07-01 04:48:38 +00:00
} ,
2017-04-15 20:04:14 +00:00
cli : false ,
2017-07-01 04:48:38 +00:00
env : false ,
mergeable : true ,
2017-04-15 20:04:14 +00:00
} ,
2017-01-20 13:03:18 +00:00
// Pull Request options
{
name : 'labels' ,
description : 'Labels to add to Pull Request' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 07:22:19 +00:00
subType : 'string' ,
2017-01-20 13:03:18 +00:00
} ,
{
name : 'assignees' ,
2017-11-22 04:12:19 +00:00
description :
2019-08-13 07:54:03 +00:00
'Assignees for Pull Request (either username or email address depending on the platform)' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 07:22:19 +00:00
subType : 'string' ,
2017-01-20 13:03:18 +00:00
} ,
2019-09-22 07:19:26 +00:00
{
name : 'assigneesSampleSize' ,
description : 'Take a random sample of given size from assignees.' ,
type : 'integer' ,
default : null ,
} ,
2019-08-06 09:21:44 +00:00
{
name : 'assignAutomerge' ,
description :
'Assign reviewers and assignees even if the PR is to be automerged' ,
type : 'boolean' ,
default : false ,
} ,
2017-01-31 13:54:16 +00:00
{
name : 'reviewers' ,
2017-11-22 04:12:19 +00:00
description :
2019-08-13 07:54:03 +00:00
'Requested reviewers for Pull Requests (either username or email address depending on the platform)' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 07:22:19 +00:00
subType : 'string' ,
2017-01-31 13:54:16 +00:00
} ,
2019-09-22 07:19:26 +00:00
{
name : 'reviewersSampleSize' ,
description : 'Take a random sample of given size from reviewers.' ,
type : 'integer' ,
default : null ,
} ,
2020-01-15 03:32:31 +00:00
{
name : 'additionalReviewers' ,
description :
'Additional reviewers for Pull Requests (in contrast to `reviewers`, this option adds to the existing reviewer list, rather than replacing it)' ,
type : 'array' ,
subType : 'string' ,
mergeable : true ,
} ,
2018-04-30 11:18:51 +00:00
{
name : 'fileMatch' ,
2019-12-08 15:46:43 +00:00
description : 'RegEx (re2) pattern for matching manager files' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
format : 'regex' ,
2018-05-06 09:59:33 +00:00
stage : 'repository' ,
2018-04-30 11:18:51 +00:00
allowString : true ,
mergeable : true ,
cli : false ,
env : false ,
} ,
2018-07-21 19:28:38 +00:00
{
name : 'js' ,
description : 'Configuration object for javascript language' ,
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2018-07-21 19:28:38 +00:00
default : { } ,
mergeable : true ,
} ,
2018-10-01 11:50:36 +00:00
{
2018-10-01 12:05:04 +00:00
name : 'golang' ,
2018-10-01 11:50:36 +00:00
description : 'Configuration object for Go language' ,
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2018-10-01 11:50:36 +00:00
default : {
commitMessageTopic : 'module {{depNameShort}}' ,
} ,
mergeable : true ,
cli : false ,
} ,
2018-11-20 18:16:13 +00:00
{
2019-03-07 14:15:01 +00:00
name : 'postUpdateOptions' ,
description :
2019-03-07 15:37:07 +00:00
'Enable post-update options to be run after package/artifact updating' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-07 14:15:01 +00:00
default : [ ] ,
2019-03-07 15:37:07 +00:00
allowedValues : [
'gomodTidy' ,
'npmDedupe' ,
'yarnDedupeFewer' ,
'yarnDedupeHighest' ,
] ,
2019-03-07 14:15:01 +00:00
cli : false ,
env : false ,
mergeable : true ,
2019-02-13 18:05:52 +00:00
} ,
{
2018-11-20 18:16:13 +00:00
name : 'ruby' ,
description : 'Configuration object for ruby language' ,
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2018-11-20 18:16:13 +00:00
default : { } ,
mergeable : true ,
cli : false ,
} ,
2018-11-09 13:22:11 +00:00
{
name : 'rust' ,
description : 'Configuration option for Rust package management.' ,
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2018-11-09 13:22:11 +00:00
default : { } ,
mergeable : true ,
cli : false ,
} ,
2017-12-05 06:50:16 +00:00
{
name : 'supportPolicy' ,
description :
'Dependency support policy, e.g. used for LTS vs non-LTS etc (node-only)' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2017-12-05 06:50:16 +00:00
allowString : true ,
} ,
{
name : 'node' ,
description : 'Configuration object for node version renovation' ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2017-12-05 06:50:16 +00:00
default : {
2018-06-02 16:23:18 +00:00
commitMessageTopic : 'Node.js' ,
major : {
enabled : false ,
2018-04-17 06:39:26 +00:00
} ,
2017-12-05 06:50:16 +00:00
} ,
mergeable : true ,
2018-03-30 04:34:20 +00:00
cli : false ,
2017-12-05 06:50:16 +00:00
} ,
2017-09-14 07:31:36 +00:00
{
name : 'docker' ,
2018-07-21 17:40:50 +00:00
description : 'Configuration object for Docker language' ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2017-09-14 07:31:36 +00:00
default : {
2020-02-18 07:34:10 +00:00
versioning : dockerVersioning.id ,
2017-09-14 07:31:36 +00:00
} ,
mergeable : true ,
cli : false ,
} ,
2018-06-08 04:15:13 +00:00
{
name : 'php' ,
description : 'Configuration object for php' ,
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2018-06-08 04:15:13 +00:00
default : { } ,
mergeable : true ,
cli : false ,
} ,
2018-04-28 18:39:07 +00:00
{
name : 'python' ,
description : 'Configuration object for python' ,
2018-05-06 09:59:33 +00:00
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2018-12-13 04:29:11 +00:00
default : {
2020-02-18 07:34:10 +00:00
versioning : pep440Versioning.id ,
2018-12-13 04:29:11 +00:00
} ,
2018-04-28 18:39:07 +00:00
mergeable : true ,
cli : false ,
} ,
2018-11-04 17:12:58 +00:00
{
name : 'compatibility' ,
description : 'Configuration object for compatibility' ,
type : 'object' ,
default : { } ,
mergeable : true ,
cli : false ,
} ,
2018-10-29 16:32:31 +00:00
{
name : 'java' ,
description : 'Configuration object for all Java package managers' ,
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2018-10-29 16:32:31 +00:00
default : { } ,
mergeable : true ,
cli : false ,
} ,
2019-03-09 06:15:16 +00:00
{
name : 'dotnet' ,
description : 'Configuration object for .NET language' ,
stage : 'package' ,
2019-03-31 06:01:06 +00:00
type : 'object' ,
2019-03-09 06:15:16 +00:00
default : { } ,
mergeable : true ,
cli : false ,
} ,
2018-08-05 05:01:49 +00:00
{
2018-09-12 10:16:17 +00:00
name : 'hostRules' ,
description : 'Host rules/configuration including credentials' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-12-13 12:51:46 +00:00
subType : 'object' ,
2019-05-25 17:48:05 +00:00
default : [
{
timeout : 60000 ,
} ,
] ,
2018-08-05 05:32:20 +00:00
stage : 'repository' ,
2018-08-31 19:44:40 +00:00
cli : true ,
2018-08-05 05:01:49 +00:00
mergeable : true ,
} ,
2019-05-21 11:20:09 +00:00
{
name : 'hostType' ,
description :
'hostType for a package rule. Can be a platform name or a datasource name' ,
type : 'string' ,
stage : 'repository' ,
parent : 'hostRules' ,
cli : false ,
env : false ,
} ,
2019-05-24 15:40:39 +00:00
{
name : 'domainName' ,
description : 'Domain name for a host rule. e.g. "docker.io"' ,
type : 'string' ,
stage : 'repository' ,
parent : 'hostRules' ,
cli : false ,
env : false ,
} ,
{
name : 'hostName' ,
description : 'Hostname for a host rule. e.g. "index.docker.io"' ,
type : 'string' ,
stage : 'repository' ,
parent : 'hostRules' ,
cli : false ,
env : false ,
} ,
{
name : 'baseUrl' ,
description : 'baseUrl for a host rule. e.g. "https://api.github.com/"' ,
type : 'string' ,
stage : 'repository' ,
parent : 'hostRules' ,
cli : false ,
env : false ,
} ,
2019-05-25 17:48:05 +00:00
{
name : 'timeout' ,
description : 'timeout (in milliseconds) for queries to external endpoints' ,
type : 'integer' ,
stage : 'repository' ,
parent : 'hostRules' ,
cli : false ,
env : false ,
} ,
2019-10-08 07:19:11 +00:00
{
name : 'insecureRegistry' ,
description : 'explicity turn on insecure docker registry access (http)' ,
type : 'boolean' ,
stage : 'repository' ,
parent : 'hostRules' ,
cli : false ,
env : false ,
} ,
2018-09-21 07:46:51 +00:00
{
name : 'prBodyDefinitions' ,
description : 'Table column definitions for use in PR tables' ,
type : 'object' ,
2019-03-31 07:16:29 +00:00
freeChoice : true ,
2018-09-21 07:46:51 +00:00
mergeable : true ,
default : {
2019-06-01 09:05:54 +00:00
Package : '{{{depNameLinked}}}' ,
2018-09-21 07:46:51 +00:00
Type : '{{{depType}}}' ,
Update : '{{{updateType}}}' ,
2018-09-24 20:04:04 +00:00
'Current value' : '{{{currentValue}}}' ,
2018-09-21 07:46:51 +00:00
'New value' : '{{{newValue}}}' ,
2019-06-01 06:23:18 +00:00
Change : '`{{{displayFrom}}}` -> `{{{displayTo}}}`' ,
2018-09-21 07:46:51 +00:00
References : '{{{references}}}' ,
'Package file' : '{{{packageFile}}}' ,
} ,
} ,
{
name : 'prBodyColumns' ,
description : 'List of columns to use in PR bodies' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2020-02-24 09:06:51 +00:00
subType : 'string' ,
2019-06-01 09:05:54 +00:00
default : [ 'Package' , 'Type' , 'Update' , 'Change' ] ,
2018-09-21 07:46:51 +00:00
} ,
2018-09-21 09:36:07 +00:00
{
name : 'prBodyNotes' ,
description :
'List of additional notes/templates to be included in the Pull Request bodies.' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2019-03-23 06:38:24 +00:00
subType : 'string' ,
2018-09-21 09:36:07 +00:00
default : [ ] ,
allowString : true ,
mergeable : true ,
} ,
2018-12-08 11:42:56 +00:00
{
name : 'suppressNotifications' ,
description :
'Options to suppress various types of warnings and other notifications' ,
2019-03-31 06:01:06 +00:00
type : 'array' ,
2020-02-24 09:06:51 +00:00
subType : 'string' ,
2019-05-30 14:12:27 +00:00
default : [ 'deprecationWarningIssues' ] ,
2018-12-08 11:42:56 +00:00
allowedValues : [
'prIgnoreNotification' ,
'prEditNotification' ,
'branchAutomergeFailure' ,
'lockFileErrors' ,
2019-02-08 13:31:30 +00:00
'artifactErrors' ,
2018-12-09 10:39:35 +00:00
'deprecationWarningIssues' ,
2018-12-11 06:22:07 +00:00
'onboardingClose' ,
2018-12-08 11:42:56 +00:00
] ,
cli : false ,
env : false ,
2018-12-16 17:45:32 +00:00
mergeable : true ,
2018-12-08 14:51:34 +00:00
} ,
2019-07-17 12:48:08 +00:00
{
name : 'pruneStaleBranches' ,
description : ` Enable or disable pruning of stale branches ` ,
type : 'boolean' ,
default : true ,
} ,
2019-09-25 09:40:16 +00:00
{
name : 'unicodeEmoji' ,
description : 'Enable or disable Unicode emoji' ,
type : 'boolean' ,
2020-05-16 16:04:43 +00:00
default : true ,
2019-09-25 09:40:16 +00:00
} ,
2019-10-05 08:00:32 +00:00
{
name : 'gitLabAutomerge' ,
description : ` Enable or disable usage of GitLab's "merge when pipeline succeeds" feature when automerging PRs ` ,
type : 'boolean' ,
default : false ,
} ,
2020-03-06 08:07:55 +00:00
{
name : 'regexManagers' ,
description : 'Custom managers using regex matching.' ,
type : 'array' ,
subType : 'object' ,
default : [ ] ,
stage : 'package' ,
cli : true ,
mergeable : true ,
} ,
{
name : 'matchStrings' ,
description :
'Regex capture rule to use. Valid only within `regexManagers` object.' ,
type : 'array' ,
subType : 'string' ,
format : 'regex' ,
parent : 'regexManagers' ,
cli : false ,
env : false ,
} ,
{
name : 'depNameTemplate' ,
description :
'Optional depName for extracted dependencies. Valid only within `regexManagers` object.' ,
type : 'string' ,
parent : 'regexManagers' ,
cli : false ,
env : false ,
} ,
{
name : 'lookupNameTemplate' ,
description :
'Optional lookupName for extracted dependencies, else defaults to depName value. Valid only within `regexManagers` object.' ,
type : 'string' ,
parent : 'regexManagers' ,
cli : false ,
env : false ,
} ,
{
name : 'datasourceTemplate' ,
description :
'Optional datasource for extracted dependencies. Valid only within `regexManagers` object.' ,
type : 'string' ,
parent : 'regexManagers' ,
cli : false ,
env : false ,
} ,
{
name : 'versioningTemplate' ,
description :
'Optional versioning for extracted dependencies. Valid only within `regexManagers` object.' ,
type : 'string' ,
parent : 'regexManagers' ,
cli : false ,
env : false ,
} ,
2017-01-20 13:03:18 +00:00
] ;
2020-03-02 11:06:16 +00:00
export function getOptions ( ) : RenovateOptions [ ] {
2017-01-20 13:03:18 +00:00
return options ;
}
2020-02-07 18:25:27 +00:00
function loadManagerOptions ( ) : void {
2020-04-06 17:38:20 +00:00
for ( const [ name , config ] of getManagers ( ) . entries ( ) ) {
2020-02-07 18:25:27 +00:00
if ( config . defaultConfig ) {
const managerConfig : RenovateOptions = {
name ,
description : ` Configuration object for the ${ name } manager ` ,
stage : 'package' ,
type : 'object' ,
default : config . defaultConfig ,
mergeable : true ,
cli : false ,
2020-02-25 05:45:00 +00:00
autogenerated : true ,
2020-02-07 18:25:27 +00:00
} ;
options . push ( managerConfig ) ;
}
}
}
loadManagerOptions ( ) ;