From 19d6c2d6712324f263ff38f79e957b50982d08ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Mon, 18 Dec 2023 11:16:20 +0800 Subject: [PATCH] =?UTF-8?q?ci(issue):=20=E4=BC=98=E5=8C=96=E6=96=87?= =?UTF-8?q?=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/issue-labeled.yml | 30 +++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/issue-labeled.yml b/.github/workflows/issue-labeled.yml index cc5e166a..86828ab2 100644 --- a/.github/workflows/issue-labeled.yml +++ b/.github/workflows/issue-labeled.yml @@ -14,6 +14,12 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: + - name: content template + id: template + run: | + DIR_NAME="详见:🍀 [Layui Issue 贡献指南](https://github.com/layui/layui/blob/main/.github/CONTRIBUTING.md)" + echo "CONTRIBUTING=$DIR_NAME" >> $GITHUB_OUTPUT + - name: help wanted if: github.event.label.name == 'help wanted' uses: actions-cool/issues-helper@v3 @@ -21,8 +27,9 @@ jobs: actions: 'create-comment' token: ${{ secrets.GITHUB_TOKEN }} body: | - @${{ github.event.issue.user.login }} 很棒 👋 - 我们有意愿采纳这项议题,欢迎您创建 [Pull Request](https://github.com/layui/layui/pulls) 来协助实现,若变更内容涉及到 API 新增和改动,除了提交核心代码外,还需包含:[文档](https://github.com/layui/layui/tree/main/docs)、测试用例等相关文件,以便我们更好地进行 Review。期待您的贡献! + @${{ github.event.issue.user.login }} 你好 👋。 + 我们赞成为该议题寻求社区帮助,欢迎创建 [Pull Request](https://github.com/layui/layui/pulls) 来协助实现,若变更内容涉及到 API 新增和改动,除了提交核心代码外,还需包含:文档、测试用例等相关文件,以便我们更好地进行 Review。期待您的贡献! + > ${{ steps.template.outputs.CONTRIBUTING }} - name: invalid if: github.event.label.name == 'invalid' @@ -31,9 +38,9 @@ jobs: actions: 'create-comment,close-issue' token: ${{ secrets.GITHUB_TOKEN }} body: | - @${{ github.event.issue.user.login }} 你好,为了提升沟通效率,我们对 Issue 制定了规范要求,你的 Issue 因不符合规范而被自动关闭。 - 建议您在下次创建 Issue 时,遵循表单模板规范填写。谢谢。 - > 相关延伸:👉 [**提问的智慧**](https://github.com/tvvocold/How-To-Ask-Questions-The-Smart-Way) + @${{ github.event.issue.user.login }} 你好,为了提升沟通效率,我们对 Issue 制定了严格的要求,你的 Issue 因不符合规定而被自动关闭。 + 建议您在下次创建 Issue 时,遵循相应规范和社区行为准则。谢谢。 + > ${{ steps.template.outputs.CONTRIBUTING }} - name: need reproduce if: github.event.label.name == 'need reproduce' @@ -46,7 +53,8 @@ jobs: - 产生问题的详细步骤 - 与问题相关的完整代码 - 在线 Demo (推荐通过 [stackblitz](https://stackblitz.com/) 或 [codepen](https://codepen.io/) 创建) - > 相关延伸:👉 [为什么要提供最小化重现?](https://antfu.me/posts/why-reproductions-are-required-zh) + > ${{ steps.template.outputs.CONTRIBUTING }} + > 延伸:👉 [为什么要提供最小化重现?](https://antfu.me/posts/why-reproductions-are-required-zh) - name: discussion if: github.event.label.name == 'discussion' @@ -55,10 +63,11 @@ jobs: actions: 'create-comment,close-issue' token: ${{ secrets.GITHUB_TOKEN }} body: | - @${{ github.event.issue.user.login }} 你好,Issue 一般只接受「Bug 报告」和「新功能请求」,而您的议题涉及到基础用法和功能疑惑等业务相关的讨论,这并不适合作为 Issue 讨论。建议您通过以下方式寻求解决方案: + @${{ github.event.issue.user.login }} 你好,Issue 一般只接受「Bug 报告」和「功能请求」,而您的议题涉及到如何使用、功能疑惑或其他业务相关的问题,这并不适合作为 Issue 讨论。建议您通过以下方式寻求解决方案: - 仔细查阅 Layui 官方文档:https://layui.dev - - 搜索相关技术资料或咨询人工智能大模型 + - 通过其他技术社区搜索相关资料、或充分利用当前主流的人工智能大模型 - [Discussions](https://github.com/layui/layui/discussions) + > ${{ steps.template.outputs.CONTRIBUTING }} - name: unrelated if: github.event.label.name == 'unrelated' @@ -67,6 +76,7 @@ jobs: actions: 'create-comment,close-issue' token: ${{ secrets.GITHUB_TOKEN }} body: | - @${{ github.event.issue.user.login }} 经过确认,您提出的问题与 Layui 不存在相关联。建议通过以下方式寻求解决方案: - - 搜索相关技术资料或咨询人工智能大模型 + @${{ github.event.issue.user.login }} 您提出的问题与 Layui 可能不存在相关联。建议通过以下方式寻求解决方案: + - 通过其他技术社区搜索相关资料、或充分利用当前主流的人工智能大模型 - [Discussions](https://github.com/layui/layui/discussions) + > ${{ steps.template.outputs.CONTRIBUTING }}