mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-21 19:25:46 +08:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
982af7d1b7 | ||
![]() |
6672cf5641 | ||
![]() |
68a418a2e3 | ||
![]() |
95857edf92 |
13
CHANGELOG.md
13
CHANGELOG.md
@@ -7,6 +7,19 @@
|
|||||||
🛠 refactor
|
🛠 refactor
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
## 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`
|
||||||
|
|
||||||
|
- 🚀 feat: add reason for closing issue. [#110](https://github.com/actions-cool/issues-helper/pull/110) [@Xhofe](https://github.com/Xhofe)
|
||||||
|
|
||||||
## v3.0.1
|
## v3.0.1
|
||||||
|
|
||||||
`2022.08.01`
|
`2022.08.01`
|
||||||
|
@@ -354,6 +354,7 @@ Close the specified issue.
|
|||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](#token) | string | ✖ |
|
| token | [Token explain](#token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
| close-reason | Reason for closing. Default `not_planned`, another `completed` | string | ✖ |
|
||||||
|
|
||||||
⏫ [Back to list](#List)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -769,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
|
- `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-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
|
- `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)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -856,10 +858,12 @@ jobs:
|
|||||||
| title-includes | Title filtering | string | ✖ |
|
| title-includes | Title filtering | string | ✖ |
|
||||||
| inactive-day | Inactive days filtering | number | ✖ |
|
| inactive-day | Inactive days filtering | number | ✖ |
|
||||||
| exclude-labels | Exclude labels filtering | string | ✖ |
|
| exclude-labels | Exclude labels filtering | string | ✖ |
|
||||||
|
| close-reason | Reason for closing. Default `not_planned`, another `completed` | string | ✖ |
|
||||||
|
|
||||||
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
|
- `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
|
- `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-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)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -940,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
|
- `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
|
- 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)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -988,6 +993,7 @@ jobs:
|
|||||||
- `issue-state`: The default is `all`. Optional value `open` `closed`, when these 2 items are not, both are `all`
|
- `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
|
- `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-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)
|
⏫ [Back to list](#List)
|
||||||
|
|
||||||
@@ -1062,6 +1068,7 @@ jobs:
|
|||||||
| emoji | Add [reaction](#emoji-types) for this comment | string | ✖ |
|
| emoji | Add [reaction](#emoji-types) for this comment | string | ✖ |
|
||||||
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
||||||
| require-permission | Permission required, default is `write` | string | ✖ |
|
| require-permission | Permission required, default is `write` | string | ✖ |
|
||||||
|
| close-reason | Reason for closing. Default `not_planned`, another `completed` | string | ✖ |
|
||||||
|
|
||||||
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
|
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
|
||||||
- `labels`: Highest priority
|
- `labels`: Highest priority
|
||||||
|
@@ -358,6 +358,7 @@ jobs:
|
|||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](#token) | string | ✖ |
|
| token | [token 说明](#token) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
| close-reason | 关闭原因。默认`not_planned`未计划,`completed`完成 | string | ✖ |
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -772,6 +773,7 @@ jobs:
|
|||||||
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
||||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||||
- `inactive-label`:默认为 `inactive`,可自定义其他。当项目未包含该 label 时,会自动新建
|
- `inactive-label`:默认为 `inactive`,可自定义其他。当项目未包含该 label 时,会自动新建
|
||||||
|
- `exclude-labels`: 设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -855,10 +857,12 @@ jobs:
|
|||||||
| title-includes | 包含标题筛选 | string | ✖ |
|
| title-includes | 包含标题筛选 | string | ✖ |
|
||||||
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||||
| exclude-labels | 排除标签筛选 | string | ✖ |
|
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||||
|
| close-reason | 关闭原因。默认`not_planned`未计划,`completed`完成 | string | ✖ |
|
||||||
|
|
||||||
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
||||||
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
||||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||||
|
- `exclude-labels`: 设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -939,6 +943,7 @@ jobs:
|
|||||||
|
|
||||||
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序
|
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序
|
||||||
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
|
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
|
||||||
|
- `exclude-labels`: 设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -987,6 +992,7 @@ jobs:
|
|||||||
- `issue-state`:默认为 `open`。可选值 `all` `closed`,非这 2 项时,均为 `open`
|
- `issue-state`:默认为 `open`。可选值 `all` `closed`,非这 2 项时,均为 `open`
|
||||||
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
||||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||||
|
- `exclude-labels`: 设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||||
|
|
||||||
⏫ [返回列表](#列-表)
|
⏫ [返回列表](#列-表)
|
||||||
|
|
||||||
@@ -1061,6 +1067,7 @@ jobs:
|
|||||||
| emoji | 为该评论的增加 [emoji](#emoji-types) | string | ✖ |
|
| emoji | 为该评论的增加 [emoji](#emoji-types) | string | ✖ |
|
||||||
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
||||||
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
||||||
|
| close-reason | 关闭原因。默认`not_planned`未计划,`completed`完成 | string | ✖ |
|
||||||
|
|
||||||
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
|
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
|
||||||
- `labels`:优先级最高
|
- `labels`:优先级最高
|
||||||
|
@@ -28,6 +28,8 @@ inputs:
|
|||||||
description: 'Issue assignees'
|
description: 'Issue assignees'
|
||||||
random-to:
|
random-to:
|
||||||
description: 'Issue assignees random to'
|
description: 'Issue assignees random to'
|
||||||
|
close-reason:
|
||||||
|
description: 'Issue close reason'
|
||||||
|
|
||||||
# label
|
# label
|
||||||
labels:
|
labels:
|
||||||
|
37
dist/index.js
vendored
37
dist/index.js
vendored
@@ -14605,6 +14605,7 @@ const dayjs_1 = __importDefault(__nccwpck_require__(7401));
|
|||||||
const isSameOrBefore_1 = __importDefault(__nccwpck_require__(9517));
|
const isSameOrBefore_1 = __importDefault(__nccwpck_require__(9517));
|
||||||
const utc_1 = __importDefault(__nccwpck_require__(4359));
|
const utc_1 = __importDefault(__nccwpck_require__(4359));
|
||||||
const core = __importStar(__nccwpck_require__(9875));
|
const core = __importStar(__nccwpck_require__(9875));
|
||||||
|
const shared_1 = __nccwpck_require__(3826);
|
||||||
const util_1 = __nccwpck_require__(9604);
|
const util_1 = __nccwpck_require__(9604);
|
||||||
const base_1 = __nccwpck_require__(8824);
|
const base_1 = __nccwpck_require__(8824);
|
||||||
let ICE;
|
let ICE;
|
||||||
@@ -14649,11 +14650,17 @@ function doQueryIssues(state, creator, ignoreLabels) {
|
|||||||
*/
|
*/
|
||||||
if (bodyCheck && titleCheck && issue.pull_request === undefined) {
|
if (bodyCheck && titleCheck && issue.pull_request === undefined) {
|
||||||
if (excludeLabelsArr.length) {
|
if (excludeLabelsArr.length) {
|
||||||
|
if (issue.labels.length) {
|
||||||
for (let i = 0; i < issue.labels.length; i += 1) {
|
for (let i = 0; i < issue.labels.length; i += 1) {
|
||||||
if (excludeLabelsArr.includes(issue.labels[i].name))
|
if (excludeLabelsArr.includes(issue.labels[i].name))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if (excludeLabelsArr.includes(shared_1.EConst.ExcludeEmpty))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
const inactiveDay = core.getInput('inactive-day');
|
const inactiveDay = core.getInput('inactive-day');
|
||||||
if (inactiveDay) {
|
if (inactiveDay) {
|
||||||
dayjs_1.default.extend(utc_1.default);
|
dayjs_1.default.extend(utc_1.default);
|
||||||
@@ -14763,7 +14770,7 @@ function doCheckIssue() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.doCheckIssue = doCheckIssue;
|
exports.doCheckIssue = doCheckIssue;
|
||||||
function doCloseIssues(body, emoji) {
|
function doCloseIssues(body, closeReason, emoji) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const issues = yield doQueryIssues('open');
|
const issues = yield doQueryIssues('open');
|
||||||
if (issues.length) {
|
if (issues.length) {
|
||||||
@@ -14771,7 +14778,7 @@ function doCloseIssues(body, emoji) {
|
|||||||
core.info(`[doCloseIssues] Doing ---> ${number}`);
|
core.info(`[doCloseIssues] Doing ---> ${number}`);
|
||||||
if (body)
|
if (body)
|
||||||
yield (0, base_1.doCreateComment)(body, emoji, number);
|
yield (0, base_1.doCreateComment)(body, emoji, number);
|
||||||
yield (0, base_1.doCloseIssue)(number);
|
yield (0, base_1.doCloseIssue)(closeReason, number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -14889,7 +14896,7 @@ function doMarkAssignees(comment) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.doMarkAssignees = doMarkAssignees;
|
exports.doMarkAssignees = doMarkAssignees;
|
||||||
function doMarkDuplicate(comment, labels, emoji) {
|
function doMarkDuplicate(comment, closeReason, labels, emoji) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const duplicateCommand = core.getInput('duplicate-command');
|
const duplicateCommand = core.getInput('duplicate-command');
|
||||||
const duplicateLabels = core.getInput('duplicate-labels');
|
const duplicateLabels = core.getInput('duplicate-labels');
|
||||||
@@ -14934,7 +14941,7 @@ function doMarkDuplicate(comment, labels, emoji) {
|
|||||||
yield (0, base_1.doSetLabels)(newLabels);
|
yield (0, base_1.doSetLabels)(newLabels);
|
||||||
}
|
}
|
||||||
if (closeIssue === 'true') {
|
if (closeIssue === 'true') {
|
||||||
yield (0, base_1.doCloseIssue)();
|
yield (0, base_1.doCloseIssue)(closeReason);
|
||||||
}
|
}
|
||||||
core.info(`[doMarkDuplicate] Done!`);
|
core.info(`[doMarkDuplicate] Done!`);
|
||||||
}
|
}
|
||||||
@@ -15032,11 +15039,11 @@ function doAddLabels(labels, issueNumber) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.doAddLabels = doAddLabels;
|
exports.doAddLabels = doAddLabels;
|
||||||
function doCloseIssue(issueNumber) {
|
function doCloseIssue(reason, issueNumber) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (issueNumber)
|
if (issueNumber)
|
||||||
ICE.setIssueNumber(issueNumber);
|
ICE.setIssueNumber(issueNumber);
|
||||||
yield ICE.closeIssue();
|
yield ICE.closeIssue(reason);
|
||||||
core.info(`[doCloseIssue] success!`);
|
core.info(`[doCloseIssue] success!`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -15244,6 +15251,7 @@ class IssueHelperEngine {
|
|||||||
this.body = '';
|
this.body = '';
|
||||||
this.state = 'open';
|
this.state = 'open';
|
||||||
this.updateMode = 'replace';
|
this.updateMode = 'replace';
|
||||||
|
this.closeReason = 'not_planned';
|
||||||
this.initInput(ctx);
|
this.initInput(ctx);
|
||||||
this.initIssueCore();
|
this.initIssueCore();
|
||||||
(0, base_1.initBaseICE)(this.ICE);
|
(0, base_1.initBaseICE)(this.ICE);
|
||||||
@@ -15281,6 +15289,7 @@ class IssueHelperEngine {
|
|||||||
this.body = core.getInput('body') || '';
|
this.body = core.getInput('body') || '';
|
||||||
this.state = core.getInput('state') === 'closed' ? 'closed' : 'open';
|
this.state = core.getInput('state') === 'closed' ? 'closed' : 'open';
|
||||||
this.updateMode = core.getInput('update-mode') === 'append' ? 'append' : 'replace';
|
this.updateMode = core.getInput('update-mode') === 'append' ? 'append' : 'replace';
|
||||||
|
this.closeReason = core.getInput('close-reason') === 'completed' ? 'completed' : 'not_planned';
|
||||||
}
|
}
|
||||||
initIssueCore() {
|
initIssueCore() {
|
||||||
const { owner, repo, issueNumber } = this;
|
const { owner, repo, issueNumber } = this;
|
||||||
@@ -15295,7 +15304,7 @@ class IssueHelperEngine {
|
|||||||
}
|
}
|
||||||
doExeAction(action) {
|
doExeAction(action) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const { issueNumber, emoji, labels, assignees, title, body, updateMode, state, ctx } = this;
|
const { issueNumber, emoji, labels, assignees, title, body, updateMode, state, ctx, closeReason, } = this;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
// ---[ Base Begin ]--->>>
|
// ---[ Base Begin ]--->>>
|
||||||
case 'add-assignees': {
|
case 'add-assignees': {
|
||||||
@@ -15317,7 +15326,7 @@ class IssueHelperEngine {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'close-issue': {
|
case 'close-issue': {
|
||||||
yield (0, base_1.doCloseIssue)();
|
yield (0, base_1.doCloseIssue)(closeReason);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'create-comment': {
|
case 'create-comment': {
|
||||||
@@ -15395,7 +15404,7 @@ class IssueHelperEngine {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'close-issues': {
|
case 'close-issues': {
|
||||||
yield (0, advanced_1.doCloseIssues)(body, emoji);
|
yield (0, advanced_1.doCloseIssues)(body, closeReason, emoji);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'find-comments': {
|
case 'find-comments': {
|
||||||
@@ -15423,7 +15432,7 @@ class IssueHelperEngine {
|
|||||||
core.warning(`[mark-duplicate] only support event '[issue_comment: created/edited]'!`);
|
core.warning(`[mark-duplicate] only support event '[issue_comment: created/edited]'!`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
yield (0, advanced_1.doMarkDuplicate)(ctx.payload.comment, labels, emoji);
|
yield (0, advanced_1.doMarkDuplicate)(ctx.payload.comment, closeReason, labels, emoji);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'welcome': {
|
case 'welcome': {
|
||||||
@@ -15564,7 +15573,7 @@ class IssueCoreEngine {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
closeIssue() {
|
closeIssue(reason) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const { owner, repo, octokit, issueNumber } = this;
|
const { owner, repo, octokit, issueNumber } = this;
|
||||||
yield octokit.issues.update({
|
yield octokit.issues.update({
|
||||||
@@ -15572,6 +15581,7 @@ class IssueCoreEngine {
|
|||||||
repo,
|
repo,
|
||||||
issue_number: issueNumber,
|
issue_number: issueNumber,
|
||||||
state: 'closed',
|
state: 'closed',
|
||||||
|
state_reason: reason,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -15901,7 +15911,7 @@ main();
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.ELockReasons = exports.EEmoji = void 0;
|
exports.EConst = exports.ELockReasons = exports.EEmoji = void 0;
|
||||||
exports.EEmoji = {
|
exports.EEmoji = {
|
||||||
'+1': '+1',
|
'+1': '+1',
|
||||||
'-1': '-1',
|
'-1': '-1',
|
||||||
@@ -15918,6 +15928,9 @@ exports.ELockReasons = {
|
|||||||
resolved: 'resolved',
|
resolved: 'resolved',
|
||||||
spam: 'spam',
|
spam: 'spam',
|
||||||
};
|
};
|
||||||
|
exports.EConst = {
|
||||||
|
ExcludeEmpty: '$exclude-empty',
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
@@ -6,7 +6,8 @@ import utc from 'dayjs/plugin/utc';
|
|||||||
|
|
||||||
import * as core from '../core';
|
import * as core from '../core';
|
||||||
import type { IIssueCoreEngine, IListIssuesParams, TCommentInfo, TIssueList } from '../issue';
|
import type { IIssueCoreEngine, IListIssuesParams, TCommentInfo, TIssueList } from '../issue';
|
||||||
import type { TEmoji, TIssueState, TOutList } from '../types';
|
import { EConst } from '../shared';
|
||||||
|
import type { TCloseReason, TEmoji, TIssueState, TOutList } from '../types';
|
||||||
import { checkDuplicate, matchKeyword, replaceStr2Arr } from '../util';
|
import { checkDuplicate, matchKeyword, replaceStr2Arr } from '../util';
|
||||||
import {
|
import {
|
||||||
doAddAssignees,
|
doAddAssignees,
|
||||||
@@ -67,9 +68,13 @@ export async function doQueryIssues(
|
|||||||
*/
|
*/
|
||||||
if (bodyCheck && titleCheck && issue.pull_request === undefined) {
|
if (bodyCheck && titleCheck && issue.pull_request === undefined) {
|
||||||
if (excludeLabelsArr.length) {
|
if (excludeLabelsArr.length) {
|
||||||
|
if (issue.labels.length) {
|
||||||
for (let i = 0; i < issue.labels.length; i += 1) {
|
for (let i = 0; i < issue.labels.length; i += 1) {
|
||||||
if (excludeLabelsArr.includes(issue.labels[i].name)) return;
|
if (excludeLabelsArr.includes(issue.labels[i].name)) return;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (excludeLabelsArr.includes(EConst.ExcludeEmpty)) return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const inactiveDay = core.getInput('inactive-day');
|
const inactiveDay = core.getInput('inactive-day');
|
||||||
@@ -179,13 +184,13 @@ export async function doCheckIssue() {
|
|||||||
core.setOutput('check-result', checkResult);
|
core.setOutput('check-result', checkResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function doCloseIssues(body: string, emoji?: string) {
|
export async function doCloseIssues(body: string, closeReason: TCloseReason, emoji?: string) {
|
||||||
const issues = await doQueryIssues('open');
|
const issues = await doQueryIssues('open');
|
||||||
if (issues.length) {
|
if (issues.length) {
|
||||||
for (const { number } of issues) {
|
for (const { number } of issues) {
|
||||||
core.info(`[doCloseIssues] Doing ---> ${number}`);
|
core.info(`[doCloseIssues] Doing ---> ${number}`);
|
||||||
if (body) await doCreateComment(body, emoji, number);
|
if (body) await doCreateComment(body, emoji, number);
|
||||||
await doCloseIssue(number);
|
await doCloseIssue(closeReason, number);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
core.info(`[doCloseIssues] Query issues empty!`);
|
core.info(`[doCloseIssues] Query issues empty!`);
|
||||||
@@ -293,6 +298,7 @@ export async function doMarkAssignees(comment: TCommentInfo) {
|
|||||||
|
|
||||||
export async function doMarkDuplicate(
|
export async function doMarkDuplicate(
|
||||||
comment: TCommentInfo,
|
comment: TCommentInfo,
|
||||||
|
closeReason: TCloseReason,
|
||||||
labels?: string[] | void,
|
labels?: string[] | void,
|
||||||
emoji?: string,
|
emoji?: string,
|
||||||
) {
|
) {
|
||||||
@@ -345,7 +351,7 @@ export async function doMarkDuplicate(
|
|||||||
await doSetLabels(newLabels);
|
await doSetLabels(newLabels);
|
||||||
}
|
}
|
||||||
if (closeIssue === 'true') {
|
if (closeIssue === 'true') {
|
||||||
await doCloseIssue();
|
await doCloseIssue(closeReason);
|
||||||
}
|
}
|
||||||
core.info(`[doMarkDuplicate] Done!`);
|
core.info(`[doMarkDuplicate] Done!`);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -3,7 +3,7 @@ import { dealStringToArr } from 'actions-util';
|
|||||||
import * as core from '../core';
|
import * as core from '../core';
|
||||||
import type { IIssueCoreEngine } from '../issue';
|
import type { IIssueCoreEngine } from '../issue';
|
||||||
import { ELockReasons } from '../shared';
|
import { ELockReasons } from '../shared';
|
||||||
import type { TEmoji, TIssueState, TLockReasons, TUpdateMode } from '../types';
|
import type { TCloseReason, TEmoji, TIssueState, TLockReasons, TUpdateMode } from '../types';
|
||||||
|
|
||||||
let ICE: IIssueCoreEngine;
|
let ICE: IIssueCoreEngine;
|
||||||
export function initBaseICE(_ICE: IIssueCoreEngine) {
|
export function initBaseICE(_ICE: IIssueCoreEngine) {
|
||||||
@@ -21,9 +21,9 @@ export async function doAddLabels(labels: string[], issueNumber?: number) {
|
|||||||
core.info(`[doAddLabels] [${labels}] success!`);
|
core.info(`[doAddLabels] [${labels}] success!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function doCloseIssue(issueNumber?: number) {
|
export async function doCloseIssue(reason: TCloseReason, issueNumber?: number) {
|
||||||
if (issueNumber) ICE.setIssueNumber(issueNumber);
|
if (issueNumber) ICE.setIssueNumber(issueNumber);
|
||||||
await ICE.closeIssue();
|
await ICE.closeIssue(reason);
|
||||||
core.info(`[doCloseIssue] success!`);
|
core.info(`[doCloseIssue] success!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ import { dealStringToArr } from 'actions-util';
|
|||||||
import * as core from '../core';
|
import * as core from '../core';
|
||||||
import type { IIssueCoreEngine, TCommentInfo } from '../issue';
|
import type { IIssueCoreEngine, TCommentInfo } from '../issue';
|
||||||
import { IssueCoreEngine } from '../issue';
|
import { IssueCoreEngine } from '../issue';
|
||||||
import type { Context, TAction, TIssueState, TUpdateMode } from '../types';
|
import type { Context, TAction, TCloseReason, TIssueState, TUpdateMode } from '../types';
|
||||||
import { dealRandomAssignees } from '../util';
|
import { dealRandomAssignees } from '../util';
|
||||||
import {
|
import {
|
||||||
doCheckInactive,
|
doCheckInactive,
|
||||||
@@ -51,6 +51,7 @@ export class IssueHelperEngine implements IIssueHelperEngine {
|
|||||||
private body: string = '';
|
private body: string = '';
|
||||||
private state: TIssueState = 'open';
|
private state: TIssueState = 'open';
|
||||||
private updateMode: TUpdateMode = 'replace';
|
private updateMode: TUpdateMode = 'replace';
|
||||||
|
private closeReason: TCloseReason = 'not_planned';
|
||||||
|
|
||||||
public constructor(readonly ctx: Context) {
|
public constructor(readonly ctx: Context) {
|
||||||
this.initInput(ctx);
|
this.initInput(ctx);
|
||||||
@@ -92,6 +93,7 @@ export class IssueHelperEngine implements IIssueHelperEngine {
|
|||||||
this.body = core.getInput('body') || '';
|
this.body = core.getInput('body') || '';
|
||||||
this.state = core.getInput('state') === 'closed' ? 'closed' : 'open';
|
this.state = core.getInput('state') === 'closed' ? 'closed' : 'open';
|
||||||
this.updateMode = core.getInput('update-mode') === 'append' ? 'append' : 'replace';
|
this.updateMode = core.getInput('update-mode') === 'append' ? 'append' : 'replace';
|
||||||
|
this.closeReason = core.getInput('close-reason') === 'completed' ? 'completed' : 'not_planned';
|
||||||
}
|
}
|
||||||
|
|
||||||
private initIssueCore() {
|
private initIssueCore() {
|
||||||
@@ -107,7 +109,18 @@ export class IssueHelperEngine implements IIssueHelperEngine {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async doExeAction(action: TAction) {
|
public async doExeAction(action: TAction) {
|
||||||
const { issueNumber, emoji, labels, assignees, title, body, updateMode, state, ctx } = this;
|
const {
|
||||||
|
issueNumber,
|
||||||
|
emoji,
|
||||||
|
labels,
|
||||||
|
assignees,
|
||||||
|
title,
|
||||||
|
body,
|
||||||
|
updateMode,
|
||||||
|
state,
|
||||||
|
ctx,
|
||||||
|
closeReason,
|
||||||
|
} = this;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
// ---[ Base Begin ]--->>>
|
// ---[ Base Begin ]--->>>
|
||||||
case 'add-assignees': {
|
case 'add-assignees': {
|
||||||
@@ -127,7 +140,7 @@ export class IssueHelperEngine implements IIssueHelperEngine {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'close-issue': {
|
case 'close-issue': {
|
||||||
await doCloseIssue();
|
await doCloseIssue(closeReason);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'create-comment': {
|
case 'create-comment': {
|
||||||
@@ -202,7 +215,7 @@ export class IssueHelperEngine implements IIssueHelperEngine {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'close-issues': {
|
case 'close-issues': {
|
||||||
await doCloseIssues(body, emoji);
|
await doCloseIssues(body, closeReason, emoji);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'find-comments': {
|
case 'find-comments': {
|
||||||
@@ -230,7 +243,7 @@ export class IssueHelperEngine implements IIssueHelperEngine {
|
|||||||
core.warning(`[mark-duplicate] only support event '[issue_comment: created/edited]'!`);
|
core.warning(`[mark-duplicate] only support event '[issue_comment: created/edited]'!`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await doMarkDuplicate(ctx.payload.comment as TCommentInfo, labels, emoji);
|
await doMarkDuplicate(ctx.payload.comment as TCommentInfo, closeReason, labels, emoji);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'welcome': {
|
case 'welcome': {
|
||||||
|
@@ -1,7 +1,14 @@
|
|||||||
import { Octokit } from '@octokit/rest';
|
import { Octokit } from '@octokit/rest';
|
||||||
|
|
||||||
import { EEmoji } from '../shared';
|
import { EEmoji } from '../shared';
|
||||||
import type { TEmoji, TIssueState, TLockReasons, TUpdateMode, TUserPermission } from '../types';
|
import type {
|
||||||
|
TEmoji,
|
||||||
|
TIssueState,
|
||||||
|
TLockReasons,
|
||||||
|
TUpdateMode,
|
||||||
|
TUserPermission,
|
||||||
|
TCloseReason,
|
||||||
|
} from '../types';
|
||||||
import type {
|
import type {
|
||||||
IIssueBaseInfo,
|
IIssueBaseInfo,
|
||||||
IIssueCoreEngine,
|
IIssueCoreEngine,
|
||||||
@@ -53,13 +60,14 @@ export class IssueCoreEngine implements IIssueCoreEngine {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public async closeIssue() {
|
public async closeIssue(reason: TCloseReason) {
|
||||||
const { owner, repo, octokit, issueNumber } = this;
|
const { owner, repo, octokit, issueNumber } = this;
|
||||||
await octokit.issues.update({
|
await octokit.issues.update({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
issue_number: issueNumber,
|
issue_number: issueNumber,
|
||||||
state: 'closed',
|
state: 'closed',
|
||||||
|
state_reason: reason,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,11 @@
|
|||||||
import type { TEmoji, TIssueState, TLockReasons, TUpdateMode, TUserPermission } from '../types';
|
import type {
|
||||||
|
TCloseReason,
|
||||||
|
TEmoji,
|
||||||
|
TIssueState,
|
||||||
|
TLockReasons,
|
||||||
|
TUpdateMode,
|
||||||
|
TUserPermission,
|
||||||
|
} from '../types';
|
||||||
|
|
||||||
export interface IIssueBaseInfo {
|
export interface IIssueBaseInfo {
|
||||||
owner: string;
|
owner: string;
|
||||||
@@ -53,7 +60,7 @@ export interface IIssueCoreEngine {
|
|||||||
addAssignees: (assignees: string[]) => Promise<void>;
|
addAssignees: (assignees: string[]) => Promise<void>;
|
||||||
addLabels: (labels: string[]) => Promise<void>;
|
addLabels: (labels: string[]) => Promise<void>;
|
||||||
|
|
||||||
closeIssue: () => Promise<void>;
|
closeIssue: (reason: TCloseReason) => Promise<void>;
|
||||||
/**
|
/**
|
||||||
* @param body The comment body.
|
* @param body The comment body.
|
||||||
* @returns The create new comment id.
|
* @returns The create new comment id.
|
||||||
|
@@ -15,3 +15,7 @@ export const ELockReasons = {
|
|||||||
resolved: 'resolved',
|
resolved: 'resolved',
|
||||||
spam: 'spam',
|
spam: 'spam',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const EConst = {
|
||||||
|
ExcludeEmpty: '$exclude-empty',
|
||||||
|
};
|
||||||
|
@@ -12,6 +12,8 @@ export type TUpdateMode = 'append' | 'replace';
|
|||||||
|
|
||||||
export type TUserPermission = TPermissionType;
|
export type TUserPermission = TPermissionType;
|
||||||
|
|
||||||
|
export type TCloseReason = 'completed' | 'not_planned';
|
||||||
|
|
||||||
export type TOutInfo = {
|
export type TOutInfo = {
|
||||||
auth: string;
|
auth: string;
|
||||||
id?: number;
|
id?: number;
|
||||||
|
@@ -3,7 +3,8 @@ import { defineConfig } from 'dumi';
|
|||||||
|
|
||||||
const name = 'issues-helper';
|
const name = 'issues-helper';
|
||||||
|
|
||||||
const logo = 'https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*8xDgSL-O6O4AAAAAAAAAAAAAARQnAQ';
|
const logo =
|
||||||
|
'https://gw.alipayobjects.com/mdn/rms_f97235/afts/img/A*8xDgSL-O6O4AAAAAAAAAAAAAARQnAQ';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
title: 'Issues Helper',
|
title: 'Issues Helper',
|
||||||
|
@@ -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
|
- `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-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
|
- `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`
|
## `check-issue`
|
||||||
|
|
||||||
@@ -134,10 +135,12 @@ jobs:
|
|||||||
| title-includes | Title filtering | string | ✖ |
|
| title-includes | Title filtering | string | ✖ |
|
||||||
| inactive-day | Inactive days filtering | number | ✖ |
|
| inactive-day | Inactive days filtering | number | ✖ |
|
||||||
| exclude-labels | Exclude labels filtering | string | ✖ |
|
| exclude-labels | Exclude labels filtering | string | ✖ |
|
||||||
|
| close-reason | Reason for closing. Default `not_planned`, another `completed` | string | ✖ |
|
||||||
|
|
||||||
- `labels`: When there are multiple, the query will have multiple at the same time. If not entered, all
|
- `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
|
- `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-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`
|
## `find-comments`
|
||||||
|
|
||||||
@@ -213,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
|
- `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
|
- 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`
|
## `lock-issues`
|
||||||
|
|
||||||
@@ -259,6 +263,7 @@ jobs:
|
|||||||
- `issue-state`: The default is `all`. Optional value `open` `closed`, when these 2 items are not, both are `all`
|
- `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
|
- `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-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`
|
## `mark-assignees`
|
||||||
|
|
||||||
@@ -329,6 +334,7 @@ jobs:
|
|||||||
| emoji | Add [emoji](/en-US/guide/ref#-emoji-type) for this comment | string | ✖ |
|
| emoji | Add [emoji](/en-US/guide/ref#-emoji-type) for this comment | string | ✖ |
|
||||||
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
| close-issue | Whether to close the issue at the same time | string | ✖ |
|
||||||
| require-permission | Permission required, default is `write` | string | ✖ |
|
| require-permission | Permission required, default is `write` | string | ✖ |
|
||||||
|
| close-reason | Reason for closing. Default `not_planned`, another `completed` | string | ✖ |
|
||||||
|
|
||||||
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
|
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
|
||||||
- `labels`: Highest priority
|
- `labels`: Highest priority
|
||||||
|
@@ -51,6 +51,7 @@ jobs:
|
|||||||
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
||||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||||
- `inactive-label`:默认为 `inactive`,可自定义其他。当项目未包含该 label 时,会自动新建
|
- `inactive-label`:默认为 `inactive`,可自定义其他。当项目未包含该 label 时,会自动新建
|
||||||
|
- `exclude-labels`: 设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||||
|
|
||||||
## `check-issue`
|
## `check-issue`
|
||||||
|
|
||||||
@@ -130,10 +131,12 @@ jobs:
|
|||||||
| title-includes | 包含标题筛选 | string | ✖ |
|
| title-includes | 包含标题筛选 | string | ✖ |
|
||||||
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
| inactive-day | 非活跃天数筛选 | number | ✖ |
|
||||||
| exclude-labels | 排除标签筛选 | string | ✖ |
|
| exclude-labels | 排除标签筛选 | string | ✖ |
|
||||||
|
| close-reason | 关闭原因。默认`not_planned`未计划,`completed`完成 | string | ✖ |
|
||||||
|
|
||||||
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
- `labels`:为多个时,会查询同时拥有多个。不填时,会查询所有
|
||||||
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
||||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||||
|
- `exclude-labels`: 设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||||
|
|
||||||
## `find-comments`
|
## `find-comments`
|
||||||
|
|
||||||
@@ -210,6 +213,7 @@ jobs:
|
|||||||
|
|
||||||
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序
|
- `direction` 默认为升序,只有设置 `desc` 时,会返回降序
|
||||||
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
|
- 返回数组中 `created` `updated`,由所处环境决定,会是 UTC +0
|
||||||
|
- `exclude-labels`: 设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||||
|
|
||||||
## `lock-issues`
|
## `lock-issues`
|
||||||
|
|
||||||
@@ -256,6 +260,7 @@ jobs:
|
|||||||
- `issue-state`:默认为 `all`。可选值 `open` `closed`,非这 2 项时,均为 `all`
|
- `issue-state`:默认为 `all`。可选值 `open` `closed`,非这 2 项时,均为 `all`
|
||||||
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
- `issue-assignee`:不支持多人。不填或输入 * 时,查询所有。输入 `none` 会查询未添加指定人的 issues
|
||||||
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
- `inactive-day`:当输入时,会筛选 issue 更新时间早于当前时间减去非活跃天数。不填时,会查询所有
|
||||||
|
- `exclude-labels`: 设置包含 `$exclude-empty` 时,可排除无 label issue
|
||||||
|
|
||||||
## `mark-assignees`
|
## `mark-assignees`
|
||||||
|
|
||||||
@@ -326,6 +331,7 @@ jobs:
|
|||||||
| emoji | 为该评论的增加 [emoji](/guide/ref#-emoji-类型) | string | ✖ |
|
| emoji | 为该评论的增加 [emoji](/guide/ref#-emoji-类型) | string | ✖ |
|
||||||
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
| close-issue | 是否同时关闭该 issue | string | ✖ |
|
||||||
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
| require-permission | 要求权限,默认为 `write` | string | ✖ |
|
||||||
|
| close-reason | 关闭原因。默认`not_planned`未计划,`completed`完成 | string | ✖ |
|
||||||
|
|
||||||
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
|
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
|
||||||
- `labels`:优先级最高
|
- `labels`:优先级最高
|
||||||
|
@@ -98,6 +98,7 @@ Close the specified issue.
|
|||||||
| actions | Action type | string | ✔ |
|
| actions | Action type | string | ✔ |
|
||||||
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
| token | [Token explain](/en-US/guide/ref#-token) | string | ✖ |
|
||||||
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
| issue-number | The number of issue. When not input, it will be obtained from the trigger event | number | ✖ |
|
||||||
|
| close-reason | Reason for closing. Default `not_planned`, another `completed` | string | ✖ |
|
||||||
|
|
||||||
## `create-comment`
|
## `create-comment`
|
||||||
|
|
||||||
|
@@ -98,6 +98,7 @@ jobs:
|
|||||||
| actions | 操作类型 | string | ✔ |
|
| actions | 操作类型 | string | ✔ |
|
||||||
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
| token | [token 说明](/guide/ref#-token-说明) | string | ✖ |
|
||||||
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
| issue-number | 指定的 issue,当不传时会从触发事件中获取 | number | ✖ |
|
||||||
|
| close-reason | 关闭原因。默认`not_planned`未计划,`completed`完成 | string | ✖ |
|
||||||
|
|
||||||
## `create-comment`
|
## `create-comment`
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user