feat: add `$exclude-empty (#112)

* feat: add `$exclude-empty

* docs: up

* chore: format
This commit is contained in:
xrkffgg
2022-08-26 16:33:14 +08:00
committed by GitHub
parent 6672cf5641
commit 982af7d1b7
8 changed files with 47 additions and 5 deletions

16
dist/index.js vendored
View File

@@ -14605,6 +14605,7 @@ const dayjs_1 = __importDefault(__nccwpck_require__(7401));
const isSameOrBefore_1 = __importDefault(__nccwpck_require__(9517));
const utc_1 = __importDefault(__nccwpck_require__(4359));
const core = __importStar(__nccwpck_require__(9875));
const shared_1 = __nccwpck_require__(3826);
const util_1 = __nccwpck_require__(9604);
const base_1 = __nccwpck_require__(8824);
let ICE;
@@ -14649,8 +14650,14 @@ function doQueryIssues(state, creator, ignoreLabels) {
*/
if (bodyCheck && titleCheck && issue.pull_request === undefined) {
if (excludeLabelsArr.length) {
for (let i = 0; i < issue.labels.length; i += 1) {
if (excludeLabelsArr.includes(issue.labels[i].name))
if (issue.labels.length) {
for (let i = 0; i < issue.labels.length; i += 1) {
if (excludeLabelsArr.includes(issue.labels[i].name))
return;
}
}
else {
if (excludeLabelsArr.includes(shared_1.EConst.ExcludeEmpty))
return;
}
}
@@ -15904,7 +15911,7 @@ main();
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ELockReasons = exports.EEmoji = void 0;
exports.EConst = exports.ELockReasons = exports.EEmoji = void 0;
exports.EEmoji = {
'+1': '+1',
'-1': '-1',
@@ -15921,6 +15928,9 @@ exports.ELockReasons = {
resolved: 'resolved',
spam: 'spam',
};
exports.EConst = {
ExcludeEmpty: '$exclude-empty',
};
/***/ }),