Skip to content

Commit

Permalink
chore: format with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed Aug 17, 2021
1 parent 60d2a1a commit 2b6f55c
Showing 1 changed file with 14 additions and 55 deletions.
69 changes: 14 additions & 55 deletions src/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ const extendedJoi = Joi.extend({
});

const schema = Joi.object({
'github-token': Joi.string()
.trim()
.max(100),
'github-token': Joi.string().trim().max(100),

'issue-lock-inactive-days': Joi.number()
.min(0)
Expand All @@ -50,53 +48,35 @@ const schema = Joi.object({
// .iso()
.min('1970-01-01T00:00:00Z')
.max('2970-12-31T23:59:59Z'),
Joi.string()
.trim()
.valid('')
Joi.string().trim().valid('')
)
.default(''),

'issue-exclude-labels': Joi.alternatives()
.try(
extendedJoi
.stringList()
.items(
Joi.string()
.trim()
.max(50)
)
.items(Joi.string().trim().max(50))
.min(1)
.max(30)
.unique(),
Joi.string()
.trim()
.valid('')
Joi.string().trim().valid('')
)
.default(''),

'issue-lock-labels': Joi.alternatives()
.try(
extendedJoi
.stringList()
.items(
Joi.string()
.trim()
.max(50)
)
.items(Joi.string().trim().max(50))
.min(1)
.max(30)
.unique(),
Joi.string()
.trim()
.valid('')
Joi.string().trim().valid('')
)
.default(''),

'issue-lock-comment': Joi.string()
.trim()
.max(10000)
.allow('')
.default(''),
'issue-lock-comment': Joi.string().trim().max(10000).allow('').default(''),

'issue-lock-reason': Joi.string()
.valid('resolved', 'off-topic', 'too heated', 'spam', '')
Expand All @@ -114,62 +94,41 @@ const schema = Joi.object({
// .iso()
.min('1970-01-01T00:00:00Z')
.max('2970-12-31T23:59:59Z'),
Joi.string()
.trim()
.valid('')
Joi.string().trim().valid('')
)
.default(''),

'pr-exclude-labels': Joi.alternatives()
.try(
extendedJoi
.stringList()
.items(
Joi.string()
.trim()
.max(50)
)
.items(Joi.string().trim().max(50))
.min(1)
.max(30)
.unique(),
Joi.string()
.trim()
.valid('')
Joi.string().trim().valid('')
)
.default(''),

'pr-lock-labels': Joi.alternatives()
.try(
extendedJoi
.stringList()
.items(
Joi.string()
.trim()
.max(50)
)
.items(Joi.string().trim().max(50))
.min(1)
.max(30)
.unique(),
Joi.string()
.trim()
.valid('')
Joi.string().trim().valid('')
)
.default(''),

'pr-lock-comment': Joi.string()
.trim()
.max(10000)
.allow('')
.default(''),
'pr-lock-comment': Joi.string().trim().max(10000).allow('').default(''),

'pr-lock-reason': Joi.string()
.valid('resolved', 'off-topic', 'too heated', 'spam', '')
.default('resolved'),

'process-only': extendedJoi
.processOnly()
.valid('issue', 'pr', '')
.default('')
'process-only': extendedJoi.processOnly().valid('issue', 'pr', '').default('')
});

module.exports = schema;

0 comments on commit 2b6f55c

Please sign in to comment.