From f863c48ab0bc57a57ac1097e85add509a713f484 Mon Sep 17 00:00:00 2001 From: YHH <359807859@qq.com> Date: Sun, 19 Oct 2025 10:13:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(ci):=20=E8=87=AA=E5=8A=A8=E5=91=8A?= =?UTF-8?q?=E7=9F=A5=E7=94=A8=E6=88=B7=E5=8F=AF=E4=BD=BF=E7=94=A8=20AI=20?= =?UTF-8?q?=E5=8A=A9=E6=89=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ai-helper-tip.yml | 61 +++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/ai-helper-tip.yml diff --git a/.github/workflows/ai-helper-tip.yml b/.github/workflows/ai-helper-tip.yml new file mode 100644 index 00000000..b6915000 --- /dev/null +++ b/.github/workflows/ai-helper-tip.yml @@ -0,0 +1,61 @@ +name: AI Helper Tip + +# 对所有新创建的 issue 自动回复 AI 助手使用说明(新老用户都适用) +on: + issues: + types: [opened] + +permissions: + issues: write + +jobs: + tip: + runs-on: ubuntu-latest + steps: + - name: Post AI Helper Usage Tip + uses: actions/github-script@v7 + with: + script: | + const message = [ + "## 🤖 AI 助手可用 | AI Helper Available", + "", + "**中文说明:**", + "", + "本项目配备了 AI 智能助手,可以帮助你快速获得解答!", + "", + "**使用方法:** 在评论中提及 `@ai-helper`,AI 会自动搜索项目代码并提供解决方案。", + "", + "**示例:**", + "```", + "@ai-helper 如何创建一个新的 System?", + "@ai-helper 这个报错是什么原因?", + "```", + "", + "---", + "", + "**English:**", + "", + "This project has an AI assistant to help you get answers quickly!", + "", + "**How to use:** Mention `@ai-helper` in a comment, and AI will automatically search the codebase and provide solutions.", + "", + "**Examples:**", + "```", + "@ai-helper How do I create a new System?", + "@ai-helper What causes this error?", + "```", + "", + "---", + "", + "💡 *AI 助手基于代码库提供建议,复杂问题建议等待维护者回复*", + "💡 *AI suggestions are based on the codebase. For complex issues, please wait for maintainer responses*" + ].join('\n'); + + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: message + }); + + console.log('✅ AI helper tip posted successfully');