From fa27007eb9a534863df03f36aea68ecce7ab2ae5 Mon Sep 17 00:00:00 2001 From: lanyeeee Date: Mon, 18 Aug 2025 20:48:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0ISSUE=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bug_report.yml | 76 +++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 35 +++++++++ .../workflows/close-default-title-issue.yml | 44 +++++++++++ 4 files changed, 160 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/workflows/close-default-title-issue.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..4994d03 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,76 @@ +name: 🐞 反馈 Bug +description: 反馈遇到的问题 +labels: [bug] +title: "[Bug] 修改我!未修改标题的issue将被自动关闭" +body: + - type: checkboxes + attributes: + label: 在提交BUG之前 + options: + - label: 我尝试使用了最新版,我确定这个问题在最新版中依然存在 + required: true + - type: textarea + id: desc + attributes: + label: 问题描述 + description: 发生了什么情况?有什么现状?哪个视频(链接/Bv号/ep号)?问题能稳定触发吗? + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: 复现步骤 + description: 这是整个issue中**最重要**的部分 + placeholder: | + 复现步骤是影响issue处理效率的最大因素 + 没有详细的复现步骤将导致问题难以被定位,开发者需要花费大量时间来回沟通以定位问题 + 仅提供报错信息或截图而没有复现步骤,问题难以被定位,也就难以被解决 + 详细的复现步骤也是对项目维护工作的尊重 + validations: + required: true + - type: textarea + id: expected + attributes: + label: 预期行为 + description: 正常情况下应该发生什么 + validations: + required: true + - type: textarea + id: actual + attributes: + label: 实际行为 + description: 实际上发生了什么 + validations: + required: true + - type: textarea + id: logs + attributes: + label: 日志 + description: 请提供相关的日志信息 + placeholder: | + 如果相关日志比较短可以直接粘贴 + + 如果相关日志很长,建议将相关日志保存为txt,然后点击文本框下面小长条上传文件 + validations: + required: false + - type: textarea + id: media + attributes: + label: 截图或录屏 + description: 问题复现时候的截图或录屏 + placeholder: 点击文本框下面小长条可以上传文件 + - type: input + id: version + attributes: + label: 工具版本号 + placeholder: v0.0.1 + validations: + required: true + - type: textarea + id: other + attributes: + label: 其他 + description: 其他要补充的内容 + placeholder: 其他要补充的内容 + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..9f1a5d4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: ❓ 提问与讨论 + url: https://github.com/lanyeeee/bilibili-video-downloader/discussions + about: 如果有一般性问题或想发起讨论,请使用 GitHub Discussions diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..6b71531 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,35 @@ +name: 🚀 功能请求 +description: 想要请求添加某个功能 +labels: [enhancement] +title: "[功能请求] 修改我!未修改标题的issue将被自动关闭" +body: + - type: markdown + attributes: + value: | + 为了使我更好地帮助你,请提供以下信息。以及上方的标题 + - type: textarea + id: reason + attributes: + label: 原因 + description: 为什么想要这个功能 + validations: + required: true + - type: textarea + id: desc + attributes: + label: 功能简述 + description: 想要个怎样的功能 + validations: + required: true + - type: textarea + id: logic + attributes: + label: 功能逻辑 + description: 如何互交、如何使用等 + validations: + required: true + - type: textarea + id: ref + attributes: + label: 实现参考 + description: 该功能可能的实现方式,或者其他已经实现该功能的应用等 diff --git a/.github/workflows/close-default-title-issue.yml b/.github/workflows/close-default-title-issue.yml new file mode 100644 index 0000000..37f52de --- /dev/null +++ b/.github/workflows/close-default-title-issue.yml @@ -0,0 +1,44 @@ +name: Close Issues with Default Title + +on: + issues: + types: [opened] + +permissions: + issues: write + +jobs: + check-issue-title: + runs-on: ubuntu-latest + steps: + - name: Check issue title + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const issue = context.payload.issue; + const defaultTitle = '修改我!'; + + if (issue.title.includes(defaultTitle)) { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + body: '检测到此issue的标题未修改\n\n为了更好地管理项目,帮助维护者快速理解问题,方便其他用户检索,请您在编写issue时务必**修改标题**\n\n此issue将被自动关闭。请修改标题后重新提交一个issue。感谢您的理解与合作!' + }); + + await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + state: 'closed', + state_reason: 'not_planned' + }); + + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + labels: ['invalid'] + }); + } \ No newline at end of file