diff --git a/README.en-US.md b/README.en-US.md
index f7dbac0..2ff330a 100644
--- a/README.en-US.md
+++ b/README.en-US.md
@@ -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
diff --git a/README.md b/README.md
index f3243d1..c7257dd 100644
--- a/README.md
+++ b/README.md
@@ -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 模板
diff --git a/dist/index.js b/dist/index.js
index 5fbe4ec..1a1657d 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -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(' ');
diff --git a/docs/base.en-US.md b/docs/base.en-US.md
index 0ba3e97..0f6a19b 100644
--- a/docs/base.en-US.md
+++ b/docs/base.en-US.md
@@ -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
diff --git a/docs/base.md b/docs/base.md
index e1708b0..cb7a545 100644
--- a/docs/base.md
+++ b/docs/base.md
@@ -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'` 均可生效
diff --git a/docs/changelog.en-US.md b/docs/changelog.en-US.md
index 9b7962b..a204604 100644
--- a/docs/changelog.en-US.md
+++ b/docs/changelog.en-US.md
@@ -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
```
diff --git a/docs/changelog.md b/docs/changelog.md
index 009c3d1..5e8f588 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -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
```
diff --git a/src/base.js b/src/base.js
index 660537d..2d2a1bc 100644
--- a/src/base.js
+++ b/src/base.js
@@ -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 '?'`);
}
};
diff --git a/src/less/dumi.less b/src/less/dumi.less
index 38de424..db736cc 100644
--- a/src/less/dumi.less
+++ b/src/less/dumi.less
@@ -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;
+}
diff --git a/src/util.js b/src/util.js
index c728fc1..10c9b1a 100644
--- a/src/util.js
+++ b/src/util.js
@@ -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(' ');