auto-approver
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -0,1 +1,8 @@ | ||
# [1.4.0](https://github.com/ffflorian/auto-approver/compare/v1.3.2...v1.4.0) (2020-09-11) | ||
### Features | ||
* Add comment as config file option ([48100ce](https://github.com/ffflorian/auto-approver/commit/48100ce03f3c605b9230435f88ea24b545acd0ff)) | ||
## [1.3.2](https://github.com/ffflorian/auto-approver/compare/v1.3.1...v1.3.2) (2020-09-08) | ||
@@ -2,0 +9,0 @@ |
16
cli.js
@@ -55,12 +55,12 @@ #!/usr/bin/env node | ||
if (commander.message) { | ||
const results = yield autoApprover.commentByMatch(new RegExp(answer), commander.message); | ||
const commentedProjects = results.filter(result => result.actionResults.length > 0); | ||
const pluralSingular = util_1.getPlural('request', commentedProjects.length); | ||
logger.info(`Commented "${commander.message}" on ${commentedProjects.length} pull ${pluralSingular}.`); | ||
const commentResult = yield autoApprover.commentByMatch(new RegExp(answer), commander.message); | ||
const commentedProjects = commentResult.reduce((count, project) => count + project.actionResults.length, 0); | ||
const pluralSingular = util_1.getPlural('request', commentedProjects); | ||
logger.info(`Commented "${commander.message}" on ${commentedProjects} pull ${pluralSingular}.`); | ||
} | ||
else { | ||
const results = yield autoApprover.approveAllByMatch(new RegExp(answer)); | ||
const approvedProjects = results.filter(result => result.actionResults.length > 0); | ||
const pluralSingular = util_1.getPlural('request', approvedProjects.length); | ||
logger.info(`Approved ${approvedProjects.length} pull ${pluralSingular}.`); | ||
const approveResult = yield autoApprover.approveAllByMatch(new RegExp(answer)); | ||
const approvedProjects = approveResult.reduce((count, project) => count + project.actionResults.length, 0); | ||
const pluralSingular = util_1.getPlural('request', approvedProjects); | ||
logger.info(`Approved ${approvedProjects} pull ${pluralSingular}.`); | ||
} | ||
@@ -67,0 +67,0 @@ process.exit(); |
@@ -24,7 +24,7 @@ { | ||
"babel-eslint": "10.1.0", | ||
"eslint": "7.8.1", | ||
"eslint": "7.9.0", | ||
"eslint-config-prettier": "6.11.0", | ||
"eslint-plugin-import": "2.22.0", | ||
"eslint-plugin-jasmine": "4.1.1", | ||
"eslint-plugin-jsdoc": "30.4.0", | ||
"eslint-plugin-jsdoc": "30.4.2", | ||
"eslint-plugin-no-unsanitized": "3.1.2", | ||
@@ -108,3 +108,3 @@ "eslint-plugin-prettier": "3.1.4", | ||
}, | ||
"version": "1.4.0" | ||
"version": "1.4.1" | ||
} |
Sorry, the diff of this file is not supported yet
63343