diff --git a/lib/config/definitions.js b/lib/config/definitions.js index 4f8044f475dee344808bd69536325a750a906bcc..70d90a95100ab528f8b7a327f274ee32404966f6 100644 --- a/lib/config/definitions.js +++ b/lib/config/definitions.js @@ -559,8 +559,17 @@ const options = [ description: 'Update types to match against (major, minor, pin, etc). Valid only within `packageRules` object.', type: 'list', - // TODO: add allowedValues subType: 'string', + allowedValues: [ + 'major', + 'minor', + 'patch', + 'pin', + 'digest', + 'lockFileMaintenance', + 'rollback', + 'bump', + ], allowString: true, stage: 'package', parent: 'packageRules', @@ -681,6 +690,7 @@ const options = [ name: 'bumpVersion', description: 'Bump the version in the package.json being updated', type: 'string', + allowedValues: ['major', 'minor', 'patch'], }, // Major/Minor/Patch { @@ -807,9 +817,9 @@ const options = [ }, { name: 'prCreation', - description: - 'When to create the PR for a branch. Values: immediate, not-pending, status-success.', + description: 'When to create the PR for a branch.', type: 'string', + allowedValues: ['immediate', 'not-pending', 'status-success'], default: 'immediate', }, { @@ -843,9 +853,9 @@ const options = [ }, { name: 'automergeType', - description: - 'How to automerge - "branch", "pr", or "pr-comment". Branch support is GitHub-only', + description: 'How to automerge, if enabled.', type: 'string', + allowedValues: ['branch', 'pr', 'pr-comment'], default: 'pr', }, { diff --git a/renovate-schema.json b/renovate-schema.json index c7f0f898061df5db615ea310b103852b836eecf1..ee3491c95db39466c9b84dc6348c05c69499dba4 100644 --- a/renovate-schema.json +++ b/renovate-schema.json @@ -351,7 +351,17 @@ "description": "Update types to match against (major, minor, pin, etc). Valid only within `packageRules` object.", "type": "array", "items": { - "type": "string" + "type": "string", + "enum": [ + "major", + "minor", + "patch", + "pin", + "digest", + "lockFileMaintenance", + "rollback", + "bump" + ] } }, "paths": { @@ -424,7 +434,8 @@ }, "bumpVersion": { "description": "Bump the version in the package.json being updated", - "type": "string" + "type": "string", + "enum": ["major", "minor", "patch"] }, "major": { "description": "Configuration to apply when an update type is major", @@ -519,8 +530,9 @@ "default": false }, "prCreation": { - "description": "When to create the PR for a branch. Values: immediate, not-pending, status-success.", + "description": "When to create the PR for a branch.", "type": "string", + "enum": ["immediate", "not-pending", "status-success"], "default": "immediate" }, "prNotPendingHours": { @@ -544,8 +556,9 @@ "default": false }, "automergeType": { - "description": "How to automerge - \"branch\", \"pr\", or \"pr-comment\". Branch support is GitHub-only", + "description": "How to automerge, if enabled.", "type": "string", + "enum": ["branch", "pr", "pr-comment"], "default": "pr" }, "automergeComment": {