Skip to content

Commit

Permalink
fix: set defaults for new config options
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed May 1, 2018
1 parent 81f0715 commit b75ee6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/defaults.js
Original file line number Diff line number Diff line change
@@ -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 ' +
Expand Down
4 changes: 2 additions & 2 deletions src/lock.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = class Lock {
body: lockComment
});
}

if (lockLabel) {
this.logger.info(`[${issueUrl}] Labeling`);
await this.context.github.issues.addLabels({
Expand Down Expand Up @@ -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(' ');
Expand Down

0 comments on commit b75ee6d

Please sign in to comment.