Compare commits

..

5 Commits

Author SHA1 Message Date
元凛
adce2a7049 docs: update changelog 2022-08-31 21:54:52 +08:00
元凛
2b3835f42e docs: update mui url 2022-08-31 21:53:17 +08:00
xrkffgg
3cc206fdcb fix: mark-duplicate labels invalid (#116)
* test

* test

* fix labels length
2022-08-31 21:50:32 +08:00
元凛
293fb5e353 docs: fix typo 2022-08-26 16:43:12 +08:00
xrkffgg
982af7d1b7 feat: add `$exclude-empty (#112)
* feat: add `$exclude-empty

* docs: up

* chore: format
2022-08-26 16:33:14 +08:00
9 changed files with 63 additions and 15 deletions

View File

@@ -7,6 +7,19 @@
🛠 refactor
-->
## v3.2.1
`2022.08.31`
- 🐞 fix: mark-duplicate labels invalid. [#116](https://github.com/actions-cool/issues-helper/pull/116)
## v3.2.0
`2022.08.26`
- 🚀 feat: add `$exclude-empty` for `exclude-labels`. [#112](https://github.com/actions-cool/issues-helper/pull/112)
- When set to include `$exclude-empty`, no label issue can be excluded
## v3.1.0
`2022.08.09`

View File

@@ -100,8 +100,8 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
<td align="center" width="180"><a href="https://github.com/vuejs/jsx-next">jsx-next</a></td>
</tr><tr>
<td align="center" width="180">
<a href="https://github.com/mui-org/material-ui">
<img src="https://avatars2.githubusercontent.com/u/33663932?s=200&v=4" width="46"/>
<a href="https://github.com/mui/material-ui">
<img src="https://avatars.githubusercontent.com/u/33663932?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
@@ -121,7 +121,7 @@ Please leave a message at [**here**](https://github.com/actions-cool/issues-help
</td>
</tr>
<tr>
<td align="center" width="180"><a href="https://github.com/mui-org/material-ui">material-ui</a></td>
<td align="center" width="180"><a href="https://github.com/mui/material-ui">material-ui</a></td>
<td align="center" width="180"><a href="https://github.com/TuSimple/naive-ui">naive-ui</a></td>
<td align="center" width="180"><a href="https://github.com/jdf2e/nutui">nutui</a></td>
<td align="center" width="180"><a href="https://github.com/prettier/prettier">prettier</a></td>
@@ -770,6 +770,7 @@ jobs:
- `issue-assignee`: Multiplayer is not supported. If you do not enter or enter *, all will be searched. Entering `none` will query issues for which the specified person is not added
- `inactive-day`: When entering, it will filter the issue update time earlier than the current time minus the number of inactive days. If not entered, all
- `inactive-label`: The default is `inactive`, others can be customized. When the project does not contain the label, it will be created automatically
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
⏫ [Back to list](#List)
@@ -862,6 +863,7 @@ jobs:
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
- `issue-assignee`: Multiplayer is not supported. If you do not enter or enter *, all will be searched. Entering `none` will query issues for which the specified person is not added
- `inactive-day`: When entering, it will filter the issue update time earlier than the current time minus the number of inactive days. If not entered, all
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
⏫ [Back to list](#List)
@@ -942,6 +944,7 @@ Find the current repository, the creator is k , the title contains `this` , the
- `direction` defaults to ascending order, only when `desc` is set, descending order will be returned
- The `created` `updated` in the returned array, determined by the environment, will be UTC +0
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
⏫ [Back to list](#List)
@@ -990,6 +993,7 @@ jobs:
- `issue-state`: The default is `all`. Optional value `open` `closed`, when these 2 items are not, both are `all`
- `issue-assignee`: Multiplayer is not supported. If you do not enter or enter *, all will be searched. Entering `none` will query issues for which the specified person is not added
- `inactive-day`: When entering, it will filter the issue update time earlier than the current time minus the number of inactive days. If not entered, all
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
⏫ [Back to list](#List)

View File

@@ -100,8 +100,8 @@
<td align="center" width="180"><a href="https://github.com/vuejs/jsx-next">jsx-next</a></td>
</tr><tr>
<td align="center" width="180">
<a href="https://github.com/mui-org/material-ui">
<img src="https://avatars2.githubusercontent.com/u/33663932?s=200&v=4" width="46"/>
<a href="https://github.com/mui/material-ui">
<img src="https://avatars.githubusercontent.com/u/33663932?s=200&v=4" width="46"/>
</a>
</td>
<td align="center" width="180">
@@ -121,7 +121,7 @@
</td>
</tr>
<tr>
<td align="center" width="180"><a href="https://github.com/mui-org/material-ui">material-ui</a></td>
<td align="center" width="180"><a href="https://github.com/mui/material-ui">material-ui</a></td>
<td align="center" width="180"><a href="https://github.com/TuSimple/naive-ui">naive-ui</a></td>
<td align="center" width="180"><a href="https://github.com/jdf2e/nutui">nutui</a></td>
<td align="center" width="180"><a href="https://github.com/prettier/prettier">prettier</a></td>
@@ -773,6 +773,7 @@ jobs:
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
- `inactive-label`:默认为 `inactive`,可自定义其他。当项目未包含该 label 时,会自动新建
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
⏫ [返回列表](#列-表)
@@ -861,6 +862,7 @@ jobs:
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
⏫ [返回列表](#列-表)
@@ -941,6 +943,7 @@ jobs:
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
⏫ [返回列表](#列-表)
@@ -989,6 +992,7 @@ jobs:
- `issue-state`:默认为 `open`。可选值 `all` `closed`,非这 2 项时,均为 `open`
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
⏫ [返回列表](#列-表)

View File

@@ -31,8 +31,8 @@ const users = [
logo: 'https://user-images.githubusercontent.com/29775873/129506134-55044c85-24cd-47d3-81ef-dba842214d71.png'
},
{
url: 'https://github.com/mui-org/material-ui',
logo: 'https://avatars2.githubusercontent.com/u/33663932?s=200&v=4'
url: 'https://github.com/mui/material-ui',
logo: 'https://avatars.githubusercontent.com/u/33663932?s=200&v=4'
},
{
url: 'https://github.com/lijinke666/react-music-player',

18
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;
}
}
@@ -14927,7 +14934,7 @@ function doMarkDuplicate(comment, closeReason, labels, emoji) {
if (duplicateLabels) {
newLabels = [...newLabels, ...(0, actions_util_1.dealStringToArr)(duplicateLabels)];
}
if (labels) {
if (labels === null || labels === void 0 ? void 0 : labels.length) {
newLabels = [...labels];
}
if (newLabels.length > 0) {
@@ -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',
};
/***/ }),

View File

@@ -6,6 +6,7 @@ import utc from 'dayjs/plugin/utc';
import * as core from '../core';
import type { IIssueCoreEngine, IListIssuesParams, TCommentInfo, TIssueList } from '../issue';
import { EConst } from '../shared';
import type { TCloseReason, TEmoji, TIssueState, TOutList } from '../types';
import { checkDuplicate, matchKeyword, replaceStr2Arr } from '../util';
import {
@@ -67,8 +68,12 @@ export async function doQueryIssues(
*/
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)) return;
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(EConst.ExcludeEmpty)) return;
}
}
@@ -339,7 +344,7 @@ export async function doMarkDuplicate(
if (duplicateLabels) {
newLabels = [...newLabels, ...dealStringToArr(duplicateLabels)];
}
if (labels) {
if (labels?.length) {
newLabels = [...labels];
}
if (newLabels.length > 0) {

View File

@@ -15,3 +15,7 @@ export const ELockReasons = {
resolved: 'resolved',
spam: 'spam',
};
export const EConst = {
ExcludeEmpty: '$exclude-empty',
};

View File

@@ -51,6 +51,7 @@ jobs:
- `issue-assignee`: Multiplayer is not supported. If you do not enter or enter *, all will be searched. Entering `none` will query issues for which the specified person is not added
- `inactive-day`: When entering, it will filter the issue update time earlier than the current time minus the number of inactive days. If not entered, all
- `inactive-label`: The default is `inactive`, others can be customized. When the project does not contain the label, it will be created automatically
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
## `check-issue`
@@ -139,6 +140,7 @@ jobs:
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
- `issue-assignee`: Multiplayer is not supported. If you do not enter or enter *, all will be searched. Entering `none` will query issues for which the specified person is not added
- `inactive-day`: When entering, it will filter the issue update time earlier than the current time minus the number of inactive days. If not entered, all
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
## `find-comments`
@@ -214,6 +216,7 @@ Find the current repository, the creator is k , the title contains `this` , the
- `direction` defaults to ascending order, only when `desc` is set, descending order will be returned
- The `created` `updated` in the returned array, determined by the environment, will be UTC +0
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
## `lock-issues`
@@ -260,6 +263,7 @@ jobs:
- `issue-state`: The default is `all`. Optional value `open` `closed`, when these 2 items are not, both are `all`
- `issue-assignee`: Multiplayer is not supported. If you do not enter or enter *, all will be searched. Entering `none` will query issues for which the specified person is not added
- `inactive-day`: When entering, it will filter the issue update time earlier than the current time minus the number of inactive days. If not entered, all
- `exclude-labels`: When set to include `$exclude-empty`, no label issue can be excluded
## `mark-assignees`

View File

@@ -51,6 +51,7 @@ jobs:
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
- `inactive-label`:默认为 `inactive`,可自定义其他。当项目未包含该 label 时,会自动新建
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
## `check-issue`
@@ -135,6 +136,7 @@ jobs:
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
## `find-comments`
@@ -211,6 +213,7 @@ jobs:
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
## `lock-issues`
@@ -257,6 +260,7 @@ jobs:
- `issue-state`:默认为 `all`。可选值 `open` `closed`,非这 2 项时,均为 `all`
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
- `exclude-labels`:设置包含 `$exclude-empty` 时,可排除无 label issue
## `mark-assignees`