Merge pull request #39 from actions-cool/main

chore: merge main into 1.x
This commit is contained in:
xrkffgg
2021-01-13 09:35:44 +08:00
committed by GitHub
10 changed files with 40 additions and 10 deletions

View File

@@ -391,7 +391,7 @@ jobs:
| contents | Add [reaction](#reactions-types) for this comment | string | ✖ |
| close-issue | Whether to close the issue at the same time | string | ✖ |
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
- `labels`: Highest priority
- `close-issue`: Both `true` or `'true'` can take effect
@@ -1043,11 +1043,17 @@ Click the `···` icon in the upper right corner of a comment, select `Copy lin
- Version selection
- It is recommended to use the latest releases version. It can be seen in [releases](https://github.com/actions-cool/issues-helper/releases)
- You can also refer to the update log below to select the version
- The latest v1.x release code will be merged into the 1.x branch
- It also supports the direct use of branch versions. Such as:
```yml
- name: Issues Helper
uses: actions-cool/issues-helper@main
# or
- name: Issues Helper
uses: actions-cool/issues-helper@1.x
```
## Actions Template

View File

@@ -391,7 +391,7 @@ jobs:
| contents | 为该评论的增加 [reaction](#reactions-types) | string | ✖ |
| close-issue | 是否同时关闭该 issue | string | ✖ |
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
- `labels`:优先级最高
- `close-issue``true``'true'` 均可生效
@@ -1038,11 +1038,17 @@ x2 + y2
- 版本选择
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
- 同时也可参照下面的更新日志来选择版本
- 最新的 v1.x release 代码会合并到 1.x 分支中
- 也支持直接使用分支版本。如:
```yml
- name: Issues Helper
uses: actions-cool/issues-helper@main
# or
- name: Issues Helper
uses: actions-cool/issues-helper@1.x
```
## Actions 模板

6
dist/index.js vendored
View File

@@ -8042,7 +8042,7 @@ async function doMarkDuplicate (owner, repo, labels) {
const ifCommandInput = !!duplicateCommand;
if ((ifCommandInput && commentBody.startsWith(duplicateCommand) && commentBody.split(' ')[0] == duplicateCommand) || testDuplicate(commentBody)) {
if (!commentBody.includes('?') && ((ifCommandInput && commentBody.startsWith(duplicateCommand) && commentBody.split(' ')[0] == duplicateCommand) || testDuplicate(commentBody))) {
if (ifCommandInput) {
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
@@ -8074,7 +8074,7 @@ async function doMarkDuplicate (owner, repo, labels) {
await doCloseIssue(owner, repo, issueNumber);
}
} else {
core.info(`This comment body should start whith 'duplicate-command'`);
core.info(`This comment body should start whith 'duplicate-command' or 'Duplicate of' and not include '?'`);
}
};
@@ -8732,7 +8732,7 @@ function matchKeyword (content, keywords) {
function testDuplicate(body) {
if (!body || !body.startsWith('Duplicate of')) {
return false
return false;
}
let arr = body.split(' ');

View File

@@ -265,7 +265,7 @@ jobs:
| contents | Add [reaction](/en-US/guide/ref#-reactions-type) for this comment | string | ✖ |
| close-issue | Whether to close the issue at the same time | string | ✖ |
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`
- `duplicate-command`: When setting concise commands, while still supporting the original `Duplicate of`. Block content contains `?`
- `labels`: Highest priority
- `close-issue`: Both `true` or `'true'` can take effect

View File

@@ -265,7 +265,7 @@ jobs:
| contents | 为该评论的增加 [reaction](/guide/ref#-reactions-类型) | string | ✖ |
| close-issue | 是否同时关闭该 issue | string | ✖ |
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`
- `duplicate-command`:当设置简洁命令时,同时仍支持原有 `Duplicate of`。屏蔽内容包含 `?`
- `labels`:优先级最高
- `close-issue``true``'true'` 均可生效

View File

@@ -13,11 +13,17 @@ toc: menu
- Version selection
- It is recommended to use the latest releases version. It can be seen in [releases](https://github.com/actions-cool/issues-helper/releases)
- You can also refer to the update log below to select the version
- The latest v1.x release code will be merged into the 1.x branch
- It also supports the direct use of branch versions. Such as:
```yml
- name: Issues Helper
uses: actions-cool/issues-helper@main
# or
- name: Issues Helper
uses: actions-cool/issues-helper@1.x
```
<embed src="../CHANGELOG.md"></embed>

View File

@@ -13,11 +13,17 @@ toc: menu
- 版本选择
- 建议采用最新 releases 版本。可在 [releases](https://github.com/actions-cool/issues-helper/releases) 看到
- 同时也可参照下面的更新日志来选择版本
- 最新的 v1.x release 代码会合并到 1.x 分支中
- 也支持直接使用分支版本。如:
```yml
- name: Issues Helper
uses: actions-cool/issues-helper@main
# or
- name: Issues Helper
uses: actions-cool/issues-helper@1.x
```
<embed src="../CHANGELOG.md"></embed>

View File

@@ -171,7 +171,7 @@ async function doMarkDuplicate (owner, repo, labels) {
const ifCommandInput = !!duplicateCommand;
if ((ifCommandInput && commentBody.startsWith(duplicateCommand) && commentBody.split(' ')[0] == duplicateCommand) || testDuplicate(commentBody)) {
if (!commentBody.includes('?') && ((ifCommandInput && commentBody.startsWith(duplicateCommand) && commentBody.split(' ')[0] == duplicateCommand) || testDuplicate(commentBody))) {
if (ifCommandInput) {
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
@@ -203,7 +203,7 @@ async function doMarkDuplicate (owner, repo, labels) {
await doCloseIssue(owner, repo, issueNumber);
}
} else {
core.info(`This comment body should start whith 'duplicate-command'`);
core.info(`This comment body should start whith 'duplicate-command' or 'Duplicate of' and not include '?'`);
}
};

View File

@@ -104,3 +104,9 @@
background: #fafafa;
}
}
.__dumi-default-alert {
box-shadow: 0 6px 16px 2px rgba(0,0,0,.06) !important;
border-radius: 2px !important;
border: 1px solid #0000000f;
}

View File

@@ -31,7 +31,7 @@ function matchKeyword (content, keywords) {
function testDuplicate(body) {
if (!body || !body.startsWith('Duplicate of')) {
return false
return false;
}
let arr = body.split(' ');