diff --git a/src/defaults.js b/src/defaults.js index 58a34c8..c48e731 100644 --- a/src/defaults.js +++ b/src/defaults.js @@ -1,5 +1,7 @@ module.exports = { daysUntilLock: 365, + exemptLabels: [], + lockLabel: false, lockComment: 'This thread has been automatically locked because ' + 'it has not had recent activity. Please open a new issue ' + diff --git a/src/lock.js b/src/lock.js index 1ca34b8..b5e458d 100644 --- a/src/lock.js +++ b/src/lock.js @@ -23,7 +23,7 @@ module.exports = class Lock { body: lockComment }); } - + if (lockLabel) { this.logger.info(`[${issueUrl}] Labeling`); await this.context.github.issues.addLabels({ @@ -60,7 +60,7 @@ module.exports = class Lock { .replace(/\.\d{3}\w$/, ''); let query = `repo:${owner}/${repo} is:closed updated:<${timestamp}`; - if (exemptLabels && exemptLabels.length) { + if (exemptLabels.length) { const queryPart = exemptLabels .map(label => `-label:"${label}"`) .join(' ');