Skip to content
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.

Commit

Permalink
fix: apply stricter config validation
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed Jan 20, 2019
1 parent 6f92cb4 commit c5b97f4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@ const Joi = require('joi');

const schema = Joi.object().keys({
supportLabel: Joi.string()
.trim()
.max(50)
.default('support')
.description('Label used to mark issues as support requests'),

supportComment: Joi.alternatives()
.try(Joi.string(), Joi.boolean().only(false))
.try(
Joi.string()
.trim()
.max(10000),
Joi.boolean().only(false)
)
.error(() => '"supportComment" must be a string or false')
.default(
':wave: @{issue-author}, we use the issue tracker exclusively ' +
Expand Down Expand Up @@ -34,7 +41,10 @@ const schema = Joi.object().keys({
'Assign `off-topic` as the reason for locking. Set to `false` to disable'
),

_extends: Joi.string().description('Repository to extend settings from'),
_extends: Joi.string()
.trim()
.max(260)
.description('Repository to extend settings from'),

perform: Joi.boolean().default(!process.env.DRY_RUN)
});
Expand Down

0 comments on commit c5b97f4

Please sign in to comment.