Skip to content

Commit 993a39e

Browse files
authored
Update version-check.yml
1 parent 301b08d commit 993a39e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/version-check.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,16 @@ jobs:
234234
// 隐藏之前的机器人警告信息
235235
if (botComments.length > 0) {
236236
for (const comment of botComments) {
237-
// 更新评论,在前面添加 Resolved 标记
238-
const updatedBody = `~~${comment.body}~~\n\n**Resolved: 此问题已解决,用户现在使用了支持的版本** / **This issue has been resolved, the user is now using a supported version**`;
237+
// 处理每一行文本,为每一行添加删除线标记
238+
const processedLines = comment.body.split('\n').map(line => {
239+
// 忽略空行
240+
if (line.trim() === '') return '';
241+
return `~~${line}~~`;
242+
}).join('\n');
243+
244+
// 更新评论
245+
const updatedBody = `<details>\n<summary><b>已解决的版本问题 (点击展开) / Resolved Version Issue (Click to expand)</b></summary>\n\n${processedLines}\n</details>\n\n**✅ 已解决:用户现在使用了支持的版本** / **Issue resolved: User is now using a supported version**`;
246+
239247
await github.rest.issues.updateComment({
240248
owner: context.repo.owner,
241249
repo: context.repo.repo,

0 commit comments

Comments
 (0)