mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 18:25:58 +08:00
perf: expand duplicate action (#40)
* perf: expand duplicate action * up
This commit is contained in:
@@ -360,14 +360,14 @@ jobs:
|
||||
|
||||
#### `mark-duplicate`
|
||||
|
||||
Quickly mark duplicate questions, only for issue new comments.
|
||||
Quickly mark duplicate questions, only for issue new comments or edit comments.
|
||||
|
||||
```yml
|
||||
name: Issue Mark Duplicate
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
mark-duplicate:
|
||||
|
@@ -360,14 +360,14 @@ jobs:
|
||||
|
||||
#### `mark-duplicate`
|
||||
|
||||
快捷标记重复问题,仅作用于 issue 新增评论。
|
||||
快捷标记重复问题,仅作用于 issue 新增编辑评论。
|
||||
|
||||
```yml
|
||||
name: Issue Mark Duplicate
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
mark-duplicate:
|
||||
|
8
dist/index.js
vendored
8
dist/index.js
vendored
@@ -8026,11 +8026,8 @@ async function doMarkDuplicate (owner, repo, labels) {
|
||||
core.info(`This actions only support on 'issue_comment'!`);
|
||||
return false;
|
||||
}
|
||||
if (context.payload.action != 'created') {
|
||||
core.info(`This actions only support on 'issue_comment' created!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (context.payload.action == 'created' || context.payload.action == 'edited') {
|
||||
const duplicateCommand = core.getInput("duplicate-command");
|
||||
const duplicateLabels = core.getInput("duplicate-labels");
|
||||
const removeLables = core.getInput("remove-labels");
|
||||
@@ -8076,6 +8073,9 @@ async function doMarkDuplicate (owner, repo, labels) {
|
||||
} else {
|
||||
core.info(`This comment body should start whith 'duplicate-command' or 'Duplicate of' and not include '?'`);
|
||||
}
|
||||
} else {
|
||||
core.info(`This actions only support on 'issue_comment' created or edited!`);
|
||||
}
|
||||
};
|
||||
|
||||
async function doOpenIssue (owner, repo, issueNumber) {
|
||||
|
@@ -234,14 +234,14 @@ jobs:
|
||||
|
||||
## `mark-duplicate`
|
||||
|
||||
Quickly mark duplicate questions, only for issue new comments.
|
||||
Quickly mark duplicate questions, only for issue new comments or edit comments.
|
||||
|
||||
```yml
|
||||
name: Issue Mark Duplicate
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
mark-duplicate:
|
||||
|
@@ -234,14 +234,14 @@ jobs:
|
||||
|
||||
## `mark-duplicate`
|
||||
|
||||
快捷标记重复问题,仅作用于 issue 新增评论。
|
||||
快捷标记重复问题,仅作用于 issue 新增编辑评论。
|
||||
|
||||
```yml
|
||||
name: Issue Mark Duplicate
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
mark-duplicate:
|
||||
|
@@ -155,11 +155,8 @@ async function doMarkDuplicate (owner, repo, labels) {
|
||||
core.info(`This actions only support on 'issue_comment'!`);
|
||||
return false;
|
||||
}
|
||||
if (context.payload.action != 'created') {
|
||||
core.info(`This actions only support on 'issue_comment' created!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (context.payload.action == 'created' || context.payload.action == 'edited') {
|
||||
const duplicateCommand = core.getInput("duplicate-command");
|
||||
const duplicateLabels = core.getInput("duplicate-labels");
|
||||
const removeLables = core.getInput("remove-labels");
|
||||
@@ -205,6 +202,9 @@ async function doMarkDuplicate (owner, repo, labels) {
|
||||
} else {
|
||||
core.info(`This comment body should start whith 'duplicate-command' or 'Duplicate of' and not include '?'`);
|
||||
}
|
||||
} else {
|
||||
core.info(`This actions only support on 'issue_comment' created or edited!`);
|
||||
}
|
||||
};
|
||||
|
||||
async function doOpenIssue (owner, repo, issueNumber) {
|
||||
|
Reference in New Issue
Block a user