This commit is contained in:
Rhys Arkins 2019-03-31 09:16:29 +02:00
Родитель b7e5546788
Коммит 01e02ff22f
4 изменённых файлов: 15 добавлений и 10 удалений

Просмотреть файл

@ -40,7 +40,7 @@ function createSingleConfig(option) {
if (option.default !== undefined) {
temp.default = option.default;
}
if (temp.type === 'object') {
if (temp.type === 'object' && !option.freeChoice) {
temp.$ref = '#';
}
return temp;

Просмотреть файл

@ -1553,6 +1553,7 @@ const options = [
name: 'prBodyDefinitions',
description: 'Table column definitions for use in PR tables',
type: 'object',
freeChoice: true,
mergeable: true,
default: {
Package: '{{{depName}}}',

Просмотреть файл

@ -259,13 +259,18 @@ async function validateConfig(config, isPreset, parentPath) {
}
} else if (type === 'object') {
if (is.object(val)) {
const subValidation = await module.exports.validateConfig(
val,
isPreset,
currentPath
);
warnings = warnings.concat(subValidation.warnings);
errors = errors.concat(subValidation.errors);
const ignoredObjects = options
.filter(option => option.freeChoice)
.map(option => option.name);
if (!ignoredObjects.includes(key)) {
const subValidation = await module.exports.validateConfig(
val,
isPreset,
currentPath
);
warnings = warnings.concat(subValidation.warnings);
errors = errors.concat(subValidation.errors);
}
} else {
errors.push({
depName: 'Configuration Error',

Просмотреть файл

@ -1073,8 +1073,7 @@
"Change": "{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}",
"References": "{{{references}}}",
"Package file": "{{{packageFile}}}"
},
"$ref": "#"
}
},
"prBodyColumns": {
"description": "List of columns to use in PR bodies",