Skip to content

Commit

Permalink
chore: update package
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed Aug 17, 2021
1 parent 2b6f55c commit 6d12ce2
Showing 1 changed file with 24 additions and 59 deletions.
83 changes: 24 additions & 59 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24109,9 +24109,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 @@ -24125,53 +24123,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 @@ -24189,62 +24169,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;
Expand Down Expand Up @@ -24531,10 +24490,16 @@ class App {

if (lockComment) {
core.debug(`Commenting (${type}: ${issue.issue_number})`);
await this.client.rest.issues.createComment({
...issue,
body: lockComment
});
try {
await this.client.rest.issues.createComment({
...issue,
body: lockComment
});
} catch (err) {
if (!/cannot be modified.*discussion/i.test(err.message)) {
throw err;
}
}
}

if (lockLabels) {
Expand Down

0 comments on commit 6d12ce2

Please sign in to comment.