From 39028e316068b1dd8a8cfbff14b9e2a131dd8aa5 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 16 Jan 2026 09:44:48 +0800 Subject: fix(security): Potential fix for code scanning alert no. 2: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ca056e..5440cd8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,9 @@ on: branches: ["main"] workflow_dispatch: +permissions: + contents: read + env: CARGO_TERM_COLOR: always -- cgit v1.2.3-70-g09d2 From 7c5e19592110577a9e6445ad15ad30dc3fe68bae Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 16 Jan 2026 09:47:52 +0800 Subject: fix(security): Potential fix for code scanning alert no. 6: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/check.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 58fc378..1280ad7 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -13,6 +13,8 @@ on: jobs: check: + permissions: + contents: read runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 -- cgit v1.2.3-70-g09d2 From 83027c383f26f772842771a6d670642fd36c269a Mon Sep 17 00:00:00 2001 From: "Begonia, HE" <163421589+BegoniaHe@users.noreply.github.com> Date: Fri, 16 Jan 2026 04:01:19 +0100 Subject: chore: add GitHub issue and PR templates with automation workflows - Add bilingual issue templates (English & Chinese) - Bug report template with prerequisite checkboxes - Feature request template - Question template - Reverse checkbox detection ("I have not read carefully") - Add bilingual PR templates (English & Chinese) - Comprehensive checklist for code quality and testing - Test environment documentation section - Breaking changes section - Add GitHub Actions workflows - Auto-labeling based on issue content - Auto-close issues with unchecked prerequisites - Stale issue and PR management (90/60 days) - Add template configuration - External links for discussions and wiki - Template chooser interface --- .github/ISSUE_TEMPLATE/bug_report.yml | 214 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/cn-bug-report.yml | 214 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/cn-feature-request.yml | 118 ++++++++++++ .github/ISSUE_TEMPLATE/cn-question.yml | 87 +++++++++ .github/ISSUE_TEMPLATE/config.yml | 11 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 118 ++++++++++++ .github/ISSUE_TEMPLATE/question.yml | 87 +++++++++ .../cn-pull_request_template.md | 119 ++++++++++++ .../en-pull_request_template.md | 119 ++++++++++++ .github/workflows/issue-checkbox-checker.yml | 104 ++++++++++ .github/workflows/issue-checker.yml | 84 ++++++++ .github/workflows/stale.yml | 92 +++++++++ 12 files changed, 1367 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/cn-bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/cn-feature-request.yml create mode 100644 .github/ISSUE_TEMPLATE/cn-question.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/ISSUE_TEMPLATE/question.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE/cn-pull_request_template.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/en-pull_request_template.md create mode 100644 .github/workflows/issue-checkbox-checker.yml create mode 100644 .github/workflows/issue-checker.yml create mode 100644 .github/workflows/stale.yml (limited to '.github/workflows') diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..8bc5903 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,214 @@ +name: Bug Report +description: Report a bug or issue with DropOut Minecraft Launcher +title: "[Bug]: " +labels: ["bug", "needs-triage"] +assignees: [] + +body: + - type: markdown + attributes: + value: | + Thank you for taking the time to report a bug! Please fill out the form below to help us understand and fix the issue. + + - type: checkboxes + id: prerequisites + attributes: + label: Prerequisites + description: Please confirm you have completed the following before submitting. Issues that check "I have not read carefully" or fail to meet required items may be closed immediately. + options: + - label: I understand that Issues are for reporting and solving problems, not for comments or complaints. I will provide as much information as possible to help resolve the issue. + required: false + - label: I have not read carefully and just clicked through everything, believing this won't affect issue handling. + required: false + - label: I have filled in a short and clear title so that developers can quickly identify the issue when browsing the Issue list, rather than "a suggestion" or "stuck" etc. + required: false + - label: I have searched existing issues to ensure this is not a duplicate + required: false + - label: I am using the latest version of DropOut + required: false + - label: I have read the README and documentation + required: false + + - type: input + id: version + attributes: + label: DropOut Version + description: What version of DropOut are you using? + placeholder: "e.g., 0.1.23" + validations: + required: true + + - type: dropdown + id: os + attributes: + label: Operating System + description: Which operating system are you using? + options: + - Windows 11 + - Windows 10 + - Windows 8,8.1 + - Windows 7 + - macOS (Apple Silicon) + - macOS (Intel) + - Linux (Debian/Ubuntu) + - Linux (Arch) + - Linux (Fedora/RHEL) + - Other Linux + validations: + required: true + + - type: input + id: os-version + attributes: + label: OS Version + description: Specific version of your operating system + placeholder: "e.g., Windows 11 23H2, macOS 14.2, Ubuntu 22.04" + validations: + required: true + + - type: dropdown + id: minecraft-version + attributes: + label: Minecraft Version + description: Which Minecraft version are you trying to launch? + options: + - Latest Release + - Latest Snapshot + - "1.21.x" + - "1.20.x" + - "1.19.x" + - "1.18.x" + - "1.17.x" + - "1.16.x" + - "1.12.x" + - Other (specify in description) + validations: + required: true + + - type: dropdown + id: mod-loader + attributes: + label: Mod Loader + description: Are you using a mod loader? + options: + - None (Vanilla) + - Fabric + - Forge + - Not applicable + validations: + required: true + + - type: input + id: java-version + attributes: + label: Java Version + description: Which Java version are you using? + placeholder: "e.g., Java 21.0.1, Java 17.0.9, Java 8u381" + validations: + required: true + + - type: dropdown + id: java-source + attributes: + label: Java Source + description: Where did you get Java from? + options: + - Auto-detected by DropOut + - Downloaded via DropOut (Adoptium) + - Manually installed (Oracle) + - Manually installed (Sdkman) + - Manually installed (Homebrew) + - Manually installed (Chocolatey) + - Manually installed (Other) + - Unknown + validations: + required: false + + - type: textarea + id: description + attributes: + label: Bug Description + description: A clear and concise description of what the bug is + placeholder: Describe the issue you're experiencing... + validations: + required: true + + - type: textarea + id: reproduction + attributes: + label: Steps to Reproduce + description: Steps to reproduce the behavior + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: What did you expect to happen? + placeholder: Describe what you expected to happen... + validations: + required: true + + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: What actually happened? + placeholder: Describe what actually happened... + validations: + required: true + + - type: textarea + id: logs + attributes: + label: Logs and Error Messages + description: | + **📝 TODO: Add instructions for users on how to find and generate log files** + + Examples: + - For Windows: Logs are typically located in `%APPDATA%/DropOut/logs/` + - For macOS: Logs are in `~/Library/Application Support/DropOut/logs/` + - For Linux: Logs are in `~/.config/DropOut/logs/` + + Please paste any relevant logs or error messages here. + This will be automatically formatted as code. + **Please ensure DropOut is closed before uploading files.** + render: shell + placeholder: | + Paste logs here... + validations: + required: false + + - type: textarea + id: screenshots + attributes: + label: Screenshots or Screen Recordings + description: | + If applicable, add screenshots or screen recordings to help explain your problem. + + **⚠️ Important Screenshot Requirements:** + - **Use native screenshot tools** (Windows: Win+Shift+S, macOS: Cmd+Shift+4, Linux: gnome-screenshot/spectacle) + - **DO NOT use QQ/WeChat/Discord screenshot tools** as they may alter resolution and aspect ratio + - **Provide unobstructed original images** - avoid window borders or overlays + - For game-related issues, capture the actual game window + - Keep the original resolution and DPI + + You can compress large files before uploading. + placeholder: Drag and drop images here or paste image URLs + validations: + required: false + + - type: textarea + id: additional + attributes: + label: Additional Context + description: Add any other context about the problem here + placeholder: Any additional information that might be helpful... + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/cn-bug-report.yml b/.github/ISSUE_TEMPLATE/cn-bug-report.yml new file mode 100644 index 0000000..1fbe3bc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/cn-bug-report.yml @@ -0,0 +1,214 @@ +name: Bug 反馈(中文) +description: 报告 DropOut Minecraft 启动器的错误或问题 +title: "[Bug]: " +labels: ["bug", "needs-triage"] +assignees: [] + +body: + - type: markdown + attributes: + value: | + 感谢您花时间报告 Bug!请填写以下表单以帮助我们理解和修复问题。 + + - type: checkboxes + id: prerequisites + attributes: + label: 前置确认 + description: 请确认自己完成了下列项目之后再进行勾选,若未完成必选项或勾选了"我未仔细阅读"选项将视为自愿接受被直接关闭 Issue + options: + - label: 我理解 Issue 是用于反馈和解决问题的,而非吐槽评论区,将尽可能提供更多信息帮助问题解决 + required: false + - label: 我未仔细阅读这些内容,只是一键已读所有内容,并相信这不会影响问题的处理 + required: false + - label: 我填写了简短且清晰明确的标题,以便开发者在翻阅 Issue 列表时能快速确定大致问题,而不是"一个建议"、"卡住了"等 + required: false + - label: 我已搜索现有 Issue,确认这不是重复问题 + required: false + - label: 我正在使用最新版本的 DropOut + required: false + - label: 我已阅读 README 和文档 + required: false + + - type: input + id: version + attributes: + label: DropOut 版本 + description: 您正在使用的 DropOut 版本是? + placeholder: "例如:0.1.23" + validations: + required: true + + - type: dropdown + id: os + attributes: + label: 操作系统 + description: 您使用的操作系统是? + options: + - Windows 11 + - Windows 10 + - Windows 8/8.1 + - Windows 7 + - macOS (Apple Silicon) + - macOS (Intel) + - Linux (Debian/Ubuntu) + - Linux (Arch) + - Linux (Fedora/RHEL) + - 其他 Linux + validations: + required: true + + - type: input + id: os-version + attributes: + label: 操作系统版本 + description: 操作系统的具体版本号 + placeholder: "例如:Windows 11 23H2, macOS 14.2, Ubuntu 22.04" + validations: + required: true + + - type: dropdown + id: minecraft-version + attributes: + label: Minecraft 版本 + description: 您尝试启动的 Minecraft 版本是? + options: + - 最新正式版 + - 最新快照版 + - "1.21.x" + - "1.20.x" + - "1.19.x" + - "1.18.x" + - "1.17.x" + - "1.16.x" + - "1.12.x" + - 其他(请在描述中说明) + validations: + required: true + + - type: dropdown + id: mod-loader + attributes: + label: Mod 加载器 + description: 您是否使用了 Mod 加载器? + options: + - 无(原版) + - Fabric + - Forge + - 不适用 + validations: + required: true + + - type: input + id: java-version + attributes: + label: Java 版本 + description: 您使用的 Java 版本是? + placeholder: "例如:Java 21.0.1, Java 17.0.9, Java 8u381" + validations: + required: true + + - type: dropdown + id: java-source + attributes: + label: Java 来源 + description: 您的 Java 来自哪里? + options: + - DropOut 自动检测 + - 通过 DropOut 下载 (Adoptium) + - 手动安装 (Oracle) + - 手动安装 (Sdkman) + - 手动安装 (Homebrew) + - 手动安装 (Chocolatey) + - 手动安装 (其他) + - 未知 + validations: + required: false + + - type: textarea + id: description + attributes: + label: 问题描述 + description: 清晰简洁地描述这个 Bug 是什么 + placeholder: 描述您遇到的问题... + validations: + required: true + + - type: textarea + id: reproduction + attributes: + label: 复现步骤 + description: 复现该问题的步骤 + placeholder: | + 1. 打开 '...' + 2. 点击 '...' + 3. 滚动到 '...' + 4. 出现错误 + validations: + required: true + + - type: textarea + id: expected + attributes: + label: 预期行为 + description: 您期望发生什么? + placeholder: 描述您期望发生的事情... + validations: + required: true + + - type: textarea + id: actual + attributes: + label: 实际行为 + description: 实际发生了什么? + placeholder: 描述实际发生的事情... + validations: + required: true + + - type: textarea + id: logs + attributes: + label: 日志和错误信息 + description: | + **📝 TODO: 在此添加用户如何查找和生成日志文件的说明** + + 示例位置: + - Windows: 日志通常位于 `%APPDATA%/DropOut/logs/` + - macOS: 日志位于 `~/Library/Application Support/DropOut/logs/` + - Linux: 日志位于 `~/.config/DropOut/logs/` + + 请在此粘贴相关的日志或错误信息。 + 内容将自动格式化为代码。 + **请确保在上传文件前已关闭 DropOut。** + render: shell + placeholder: | + 在此粘贴日志... + validations: + required: false + + - type: textarea + id: screenshots + attributes: + label: 截图或录屏 + description: | + 如果适用,请添加截图或录屏以帮助说明您的问题。 + + **⚠️ 重要的截图要求:** + - **使用系统自带截图工具**(Windows: Win+Shift+S, macOS: Cmd+Shift+4, Linux: gnome-screenshot/spectacle) + - **不要使用 QQ/微信/Discord 截图工具**,因为它们可能会改变分辨率和纵横比 + - **提供无遮挡的原始图片** - 避免窗口边框或覆盖层 + - 对于游戏相关问题,请捕获实际游戏窗口 + - 保持原始分辨率和 DPI + + 可以在上传前压缩大文件。 + placeholder: 拖放图片到这里或粘贴图片 URL + validations: + required: false + + - type: textarea + id: additional + attributes: + label: 其他信息 + description: 在此添加关于该问题的任何其他信息 + placeholder: 任何可能有帮助的额外信息... + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/cn-feature-request.yml b/.github/ISSUE_TEMPLATE/cn-feature-request.yml new file mode 100644 index 0000000..366a533 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/cn-feature-request.yml @@ -0,0 +1,118 @@ +name: 功能请求(中文) +description: 为 DropOut 提出新功能或改进建议 +title: "[Feature]: " +labels: ["enhancement", "needs-triage"] +assignees: [] + +body: + - type: markdown + attributes: + value: | + 感谢您提出新功能建议!请填写以下表单以帮助我们理解您的需求。 + + - type: checkboxes + id: prerequisites + attributes: + label: 前置确认 + description: 请确认自己完成了下列项目之后再进行勾选,若勾选了"我未仔细阅读"选项将视为自愿接受被直接关闭 Issue + options: + - label: 我理解 Issue 是用于反馈和解决问题的,而非吐槽评论区,将尽可能提供更多信息 + required: false + - label: 我未仔细阅读这些内容,只是一键已读所有内容,并相信这不会影响问题的处理 + required: false + - label: 我已搜索现有 Issue,确认这不是重复的功能请求 + required: false + - label: 我已查看 README 中的 Roadmap + required: false + - label: 这个功能将使多个用户受益,而不仅仅是我自己 + required: false + + - type: dropdown + id: feature-type + attributes: + label: 功能类型 + description: 您请求的是哪种类型的功能? + options: + - UI/UX 改进 + - 游戏管理 + - Mod 加载器支持 + - 账户管理 + - Java 管理 + - 性能优化 + - 新平台支持 + - 文档 + - 其他 + validations: + required: true + + - type: textarea + id: problem + attributes: + label: 问题陈述 + description: 您的功能请求是否与某个问题相关?请描述。 + placeholder: "我总是对...感到困扰" + validations: + required: true + + - type: textarea + id: solution + attributes: + label: 建议的解决方案 + description: 描述您希望看到的解决方案 + placeholder: 清晰简洁地描述您希望发生的事情... + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: 替代方案 + description: 描述您考虑过的任何替代解决方案或功能 + placeholder: 是否有其他方法可以解决这个问题? + validations: + required: false + + - type: textarea + id: examples + attributes: + label: 示例和参考 + description: | + 提供其他启动器或应用程序实现类似功能的示例 + placeholder: | + - MultiMC 通过...实现 + - Prism Launcher 有类似功能... + - 可以像 [示例链接] 这样工作... + validations: + required: false + + - type: dropdown + id: priority + attributes: + label: 优先级 + description: 这个功能对您有多重要? + options: + - 关键(阻碍正常使用) + - 高(显著改善体验) + - 中(锦上添花) + - 低(小便利) + validations: + required: true + + - type: checkboxes + id: contribution + attributes: + label: 贡献意愿 + description: 您是否愿意为这个功能做出贡献? + options: + - label: 我愿意实现这个功能 + - label: 我愿意帮助测试这个功能 + - label: 我可以提供设计草图或规范 + + - type: textarea + id: additional + attributes: + label: 其他信息 + description: 在此添加关于功能请求的任何其他信息、草图或截图 + placeholder: 任何可能有帮助的额外信息... + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/cn-question.yml b/.github/ISSUE_TEMPLATE/cn-question.yml new file mode 100644 index 0000000..b7422e8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/cn-question.yml @@ -0,0 +1,87 @@ +name: 问题咨询(中文) +description: 询问关于使用 DropOut 的问题 +title: "[Question]: " +labels: ["question"] +assignees: [] + +body: + - type: markdown + attributes: + value: | + 有关于使用 DropOut 的问题吗?请填写以下表单。 + + **注意:** 如果是 Bug 报告,请使用 Bug 反馈模板。 + + - type: checkboxes + id: prerequisites + attributes: + label: 前置确认 + description: 请确认自己完成了下列项目之后再进行勾选,若勾选了"我未仔细阅读"选项将视为自愿接受被直接关闭 Issue + options: + - label: 我理解 Issue 是用于提问和获取帮助的,而非吐槽评论区 + required: false + - label: 我未仔细阅读这些内容,只是一键已读所有内容,并相信这不会影响问题的处理 + required: false + - label: 我已搜索现有 Issue,查看是否有人已经回答了我的问题 + required: false + - label: 我已阅读 README 和文档 + required: false + + - type: dropdown + id: category + attributes: + label: 问题类别 + description: 您的问题是关于什么的? + options: + - 安装和设置 + - 账户和认证 + - Minecraft 版本管理 + - Mod 加载器(Fabric/Forge) + - Java 安装和配置 + - 游戏启动问题 + - 设置和配置 + - 从源代码构建 + - 为项目做贡献 + - 其他 + validations: + required: true + + - type: textarea + id: question + attributes: + label: 您的问题 + description: 请详细描述您的问题 + placeholder: 您想了解什么? + validations: + required: true + + - type: input + id: version + attributes: + label: DropOut 版本(如果适用) + description: 您正在使用的 DropOut 版本是? + placeholder: "例如:0.1.23" + validations: + required: false + + - type: dropdown + id: os + attributes: + label: 操作系统(如果适用) + description: 您使用的操作系统是? + options: + - Windows + - macOS + - Linux + - 不适用 + validations: + required: false + + - type: textarea + id: context + 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..c775ed3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: Documentation + url: https://github.com/HsiangNianian/DropOut/blob/main/README.md + about: Read the project documentation and guides + - name: Discussions + url: https://github.com/HsiangNianian/DropOut/discussions + about: Ask questions and discuss ideas with the community + - name: Releases + url: https://github.com/HsiangNianian/DropOut/releases + about: Download the latest version or view changelog diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..38cb216 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,118 @@ +name: Feature Request +description: Suggest a new feature or enhancement for DropOut +title: "[Feature]: " +labels: ["enhancement", "needs-triage"] +assignees: [] + +body: + - type: markdown + attributes: + value: | + Thank you for suggesting a new feature! Please fill out the form below to help us understand your request. + + - type: checkboxes + id: prerequisites + attributes: + label: Prerequisites + description: Please confirm you have completed the following before submitting. Issues that check "I have not read carefully" may be closed immediately. + options: + - label: I understand that Issues are for feedback and problem-solving, not for complaints. I will provide as much information as possible. + required: false + - label: I have not read carefully and just clicked through everything, believing this won't affect issue handling. + required: false + - label: I have searched existing issues to ensure this is not a duplicate + required: false + - label: I have checked the roadmap in the README + required: false + - label: This feature would benefit multiple users, not just myself + required: false + + - type: dropdown + id: feature-type + attributes: + label: Feature Type + description: What type of feature are you requesting? + options: + - UI/UX Enhancement + - Game Management + - Mod Loader Support + - Account Management + - Java Management + - Performance Improvement + - New Platform Support + - Documentation + - Other + validations: + required: true + + - type: textarea + id: problem + attributes: + label: Problem Statement + description: Is your feature request related to a problem? Please describe. + placeholder: "I'm always frustrated when..." + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: Describe the solution you'd like to see + placeholder: A clear and concise description of what you want to happen... + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternative Solutions + description: Describe any alternative solutions or features you've considered + placeholder: Are there other ways to solve this problem? + validations: + required: false + + - type: textarea + id: examples + attributes: + label: Examples and References + description: | + Provide examples from other launchers or applications that implement similar features + placeholder: | + - MultiMC does this by... + - Prism Launcher has a similar feature... + - This could work like [example link]... + validations: + required: false + + - type: dropdown + id: priority + attributes: + label: Priority + description: How important is this feature to you? + options: + - Critical (blocks normal usage) + - High (significantly improves experience) + - Medium (nice to have) + - Low (minor convenience) + validations: + required: true + + - type: checkboxes + id: contribution + attributes: + label: Contribution + description: Would you be willing to contribute to this feature? + options: + - label: I would be willing to implement this feature + - label: I would be willing to help test this feature + - label: I can provide design mockups or specifications + + - type: textarea + id: additional + attributes: + label: Additional Context + description: Add any other context, mockups, or screenshots about the feature request here + placeholder: Any additional information that might be helpful... + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 0000000..ac170ab --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -0,0 +1,87 @@ +name: Question +description: Ask a question about using DropOut +title: "[Question]: " +labels: ["question"] +assignees: [] + +body: + - type: markdown + attributes: + value: | + Have a question about using DropOut? Please fill out the form below. + + **Note:** For bug reports, please use the Bug Report template instead. + + - type: checkboxes + id: prerequisites + attributes: + label: Prerequisites + description: Please confirm you have completed the following before submitting. Issues that check "I have not read carefully" may be closed immediately. + options: + - label: I understand that Issues are for asking questions and getting help, not for complaints. + required: false + - label: I have not read carefully and just clicked through everything, believing this won't affect issue handling. + required: false + - label: I have searched existing issues to see if my question has been answered + required: false + - label: I have read the README and documentation + required: false + + - type: dropdown + id: category + attributes: + label: Question Category + description: What is your question about? + options: + - Installation and Setup + - Account and Authentication + - Minecraft Version Management + - Mod Loaders (Fabric/Forge) + - Java Installation and Configuration + - Game Launch Issues + - Settings and Configuration + - Building from Source + - Contributing to the Project + - Other + validations: + required: true + + - type: textarea + id: question + attributes: + label: Your Question + description: Please describe your question in detail + placeholder: What would you like to know? + validations: + required: true + + - type: input + id: version + attributes: + label: DropOut Version (if applicable) + description: What version of DropOut are you using? + placeholder: "e.g., 0.1.23" + validations: + required: false + + - type: dropdown + id: os + attributes: + label: Operating System (if applicable) + description: Which operating system are you using? + options: + - Windows + - macOS + - Linux + - Not applicable + validations: + required: false + + - type: textarea + id: context + attributes: + label: Additional Context + description: Add any other context, screenshots, or information that might help us answer your question + placeholder: Any additional details... + validations: + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE/cn-pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/cn-pull_request_template.md new file mode 100644 index 0000000..3a6b749 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/cn-pull_request_template.md @@ -0,0 +1,119 @@ +# 描述 + + + +## 更改类型 + + + +- [ ] Bug 修复(修复问题的非破坏性更改) +- [ ] 新功能(添加功能的非破坏性更改) +- [ ] 破坏性更改(会导致现有功能无法正常工作的修复或功能) +- [ ] 文档更新 +- [ ] UI/UX 改进 +- [ ] 性能优化 +- [ ] 代码重构(无功能性更改) +- [ ] 配置更改 +- [ ] 测试添加或更新 + +## 相关 Issue + + + +关闭 # +相关 # + +## 更改内容 + + + +### 后端 (Rust) + +- + +### 前端 (Svelte) + +- + +### 配置 + +- + +## 测试 + + + +### 测试环境 + +- **操作系统**: +- **DropOut 版本**: +- **测试的 Minecraft 版本**: +- **Mod 加载器**: + +### 测试用例 + +- [ ] 已在 Windows 上测试 +- [ ] 已在 macOS 上测试 +- [ ] 已在 Linux 上测试 +- [ ] 已测试原版 Minecraft +- [ ] 已测试 Fabric +- [ ] 已测试 Forge +- [ ] 已测试游戏启动 +- [ ] 已测试登录流程 +- [ ] 已测试 Java 检测/下载 + +### 测试步骤 + +1. +2. +3. + +## 检查清单 + + + +### 代码质量 + +- [ ] 我的代码遵循项目的代码风格指南 +- [ ] 我已对自己的代码进行了自审 +- [ ] 我已对难以理解的区域添加了注释 +- [ ] 我的更改没有产生新的警告或错误 + +### 测试验证 + +- [ ] 我已在本地测试了我的更改 +- [ ] 我已添加测试来证明我的修复有效或功能正常工作 +- [ ] 新的和现有的单元测试在本地通过 +- [ ] 我至少在一个目标平台上进行了测试 + +### 文档更新 + +- [ ] 我已相应地更新了文档 +- [ ] 如有需要,我已更新 README +- [ ] 我已在必要处添加/更新代码注释 + +### 依赖项 + +- [ ] 我已检查没有添加不必要的依赖项 +- [ ] 所有新依赖项都已正确记录 +- [ ] `Cargo.lock` 和/或 `pnpm-lock.yaml` 已更新(如果依赖项有变化) + +## 截图 / 视频 + + + +## 附加说明 + + + +## 破坏性更改说明 + + + +--- + +**维护者专用:** + +- [ ] 代码审查已完成 +- [ ] CI 检查通过 +- [ ] 准备合并 diff --git a/.github/PULL_REQUEST_TEMPLATE/en-pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/en-pull_request_template.md new file mode 100644 index 0000000..b9b9745 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/en-pull_request_template.md @@ -0,0 +1,119 @@ +# Description + + + +## Type of Change + + + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Documentation update +- [ ] UI/UX improvement +- [ ] Performance improvement +- [ ] Code refactoring (no functional changes) +- [ ] Configuration change +- [ ] Test addition or update + +## Related Issues + + + +Closes # +Related to # + +## Changes Made + + + +### Backend (Rust) + +- + +### Frontend (Svelte) + +- + +### Configuration + +- + +## Testing + + + +### Test Environment + +- **OS**: +- **DropOut Version**: +- **Minecraft Version Tested**: +- **Mod Loader**: + +### Test Cases + +- [ ] Tested on Windows +- [ ] Tested on macOS +- [ ] Tested on Linux +- [ ] Tested with vanilla Minecraft +- [ ] Tested with Fabric +- [ ] Tested with Forge +- [ ] Tested game launch +- [ ] Tested authentication flow +- [ ] Tested Java detection/download + +### Steps to Test + +1. +2. +3. + +## Checklist + + + +### Code Quality + +- [ ] My code follows the project's style guidelines +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] My changes generate no new warnings or errors + +### Testing Verification + +- [ ] I have tested my changes locally +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] I have tested on at least one target platform + +### Documentation + +- [ ] I have updated the documentation accordingly +- [ ] I have updated the README if needed +- [ ] I have added/updated code comments where necessary + +### Dependencies + +- [ ] I have checked that no unnecessary dependencies were added +- [ ] All new dependencies are properly documented +- [ ] `Cargo.lock` and/or `pnpm-lock.yaml` are updated (if dependencies changed) + +## Screenshots / Videos + + + +## Additional Notes + + + +## Breaking Changes + + + +--- + +**For Maintainers:** + +- [ ] Code review completed +- [ ] CI checks passing +- [ ] Ready to merge diff --git a/.github/workflows/issue-checkbox-checker.yml b/.github/workflows/issue-checkbox-checker.yml new file mode 100644 index 0000000..ce7e011 --- /dev/null +++ b/.github/workflows/issue-checkbox-checker.yml @@ -0,0 +1,104 @@ +name: Issue Checkbox Checker + +on: + issues: + types: [opened, edited] + +permissions: + issues: write + +jobs: + check-checkboxes: + runs-on: ubuntu-latest + steps: + - name: Check for unchecked prerequisites + uses: actions/github-script@v7 + with: + script: | + const issue = context.payload.issue; + if (!issue) return; + + const body = issue.body || ''; + + // Check if "I have not read carefully" checkbox is checked + const notReadPatterns = [ + /- \[[xX]\] I have not read carefully/, + /- \[[xX]\] 我未仔细阅读/ + ]; + + const hasNotReadChecked = notReadPatterns.some(pattern => pattern.test(body)); + + if (hasNotReadChecked) { + const closeMessage = [ + '## Issue Automatically Closed / Issue 已自动关闭', + '', + '**English:**', + 'This issue has been automatically closed because you checked "I have not read carefully."', + '', + 'Please:', + '1. Read the [README](https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/blob/main/README.md) and documentation carefully', + '2. Search for existing issues', + '3. Fill out the issue template completely', + '4. Submit a new issue when ready', + '', + '**中文:**', + '此 Issue 已被自动关闭,因为您勾选了"我未仔细阅读"。', + '', + '请:', + '1. 仔细阅读 [README](https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/blob/main/README.md) 和文档', + '2. 搜索现有 Issue', + '3. 完整填写 Issue 模板', + '4. 准备好后提交新的 Issue', + '', + '---', + '*This is an automated action. If you believe this was done in error, please contact the maintainers.*' + ].join('\n'); + + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + body: closeMessage + }); + + 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', 'auto-closed'] + }); + + return; + } + + // Count total checkboxes and checked boxes + const totalBoxes = (body.match(/- \[[ xX]\]/g) || []).length; + const checkedBoxes = (body.match(/- \[[xX]\]/g) || []).length; + + // If no boxes are checked in prerequisites, add a reminder + if (totalBoxes > 0 && checkedBoxes === 0) { + const reminderMessage = [ + '## Reminder / 提醒', + '', + '**English:**', + 'Please check the prerequisite boxes in the issue template to confirm you have completed the required steps.', + '', + '**中文:**', + '请勾选 Issue 模板中的前置条件复选框,以确认您已完成必要步骤。' + ].join('\n'); + + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + body: reminderMessage + }); + } diff --git a/.github/workflows/issue-checker.yml b/.github/workflows/issue-checker.yml new file mode 100644 index 0000000..a598488 --- /dev/null +++ b/.github/workflows/issue-checker.yml @@ -0,0 +1,84 @@ +name: Issue Checker + +on: + issues: + types: [opened, edited] + pull_request_target: + types: [opened, edited] + +permissions: + issues: write + pull-requests: write + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Check and Label Issues + uses: actions/github-script@v7 + with: + script: | + const issue = context.payload.issue || context.payload.pull_request; + if (!issue) return; + + const body = issue.body || ''; + const title = issue.title || ''; + const isIssue = !!context.payload.issue; + const issueNumber = issue.number; + + // Skip if "I have not read carefully" is checked - handled by issue-checkbox-checker.yml + const hasNotReadChecked = + body.includes('- [x] I have not read carefully') || + body.includes('- [X] I have not read carefully') || + body.includes('- [x] 我未仔细阅读') || + body.includes('- [X] 我未仔细阅读'); + + if (hasNotReadChecked) { + // Let issue-checkbox-checker handle this + return; + } + + const labels = []; + + // Platform labels + if (body.match(/Windows|windows/i)) labels.push('platform: windows'); + if (body.match(/macOS|macos|Mac/i)) labels.push('platform: macos'); + if (body.match(/Linux|linux|Ubuntu|Debian|Arch|Fedora/i)) labels.push('platform: linux'); + + // Mod loader labels + if (body.match(/Fabric/i)) labels.push('mod-loader: fabric'); + if (body.match(/Forge/i)) labels.push('mod-loader: forge'); + + // Java related + if (body.match(/Java|java|JRE|JDK/i)) labels.push('java'); + + // Authentication issues + if (body.match(/login|authentication|Microsoft|Xbox|account/i)) labels.push('authentication'); + + // Download issues + if (body.match(/download|downloading|assets|libraries/i)) labels.push('download'); + + // Launch issues + if (body.match(/launch|start|won't start|crash|crashed/i)) labels.push('launch'); + + // UI issues + if (body.match(/UI|interface|display|rendering|visual/i)) labels.push('ui'); + + // Performance issues + if (body.match(/slow|performance|lag|freeze|hang/i)) labels.push('performance'); + + // Check for unclear titles + if (isIssue && (title.length < 10 || + title.match(/^(help|问题|stuck|卡住|error|错误|bug)$/i))) { + labels.push('needs-clarification'); + } + + // Apply labels + if (labels.length > 0) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + labels: labels + }); + } diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..4005b2c --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,92 @@ +name: 'Close stale issues' + +on: + schedule: + - cron: '0 0 * * *' # Run daily at midnight UTC + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + # Issues + days-before-issue-stale: 90 + days-before-issue-close: 7 + stale-issue-label: 'stale' + exempt-issue-labels: 'pinned,enhancement,documentation' + stale-issue-message: | + ## This issue has been automatically marked as stale + ## 此 Issue 已被自动标记为过期 + + **English:** + This issue has had no activity for 90 days and will be closed in 7 days if no further activity occurs. + + If this issue is still relevant: + - Comment with an update + - Provide additional information + - Confirm you're still experiencing the problem + + **中文:** + 此 Issue 已 90 天无活动,如果继续无活动将在 7 天后关闭。 + + 如果此问题仍然相关: + - 发表评论更新状态 + - 提供额外信息 + - 确认您仍在遇到该问题 + + --- + *This is an automated message. To prevent closure, simply comment on this issue.* + close-issue-message: | + ## This issue has been automatically closed + ## 此 Issue 已被自动关闭 + + **English:** + This issue was automatically closed due to inactivity. If you're still experiencing this problem, please open a new issue with updated information. + + **中文:** + 此 Issue 因无活动而被自动关闭。如果您仍然遇到此问题,请开启一个新的 Issue 并提供最新信息。 + + # Pull Requests + days-before-pr-stale: 60 + days-before-pr-close: 14 + stale-pr-label: 'stale' + exempt-pr-labels: 'pinned,security' + stale-pr-message: | + ## This pull request has been automatically marked as stale + ## 此 PR 已被自动标记为过期 + + **English:** + This pull request has had no activity for 60 days and will be closed in 14 days if no further activity occurs. + + If you're still working on this: + - Push new commits + - Comment with a status update + - Request a review + + **中文:** + 此 PR 已 60 天无活动,如果继续无活动将在 14 天后关闭。 + + 如果您仍在处理此问题: + - 推送新的提交 + - 发表评论更新状态 + - 请求审查 + close-pr-message: | + ## This pull request has been automatically closed + ## 此 PR 已被自动关闭 + + **English:** + This pull request was automatically closed due to inactivity. Feel free to reopen if you resume work on this. + + **中文:** + 此 PR 因无活动而被自动关闭。如果您恢复工作,请随时重新开启。 + + # General settings + operations-per-run: 100 + remove-stale-when-updated: true + ascending: true -- cgit v1.2.3-70-g09d2 From 9fafc670ccbce9d1f457bb69d03b40988d98b961 Mon Sep 17 00:00:00 2001 From: "Begonia, HE" <163421589+BegoniaHe@users.noreply.github.com> Date: Fri, 16 Jan 2026 07:22:45 +0100 Subject: ci(workflows): remove issue-checker due to incorrect PR labeling --- .github/workflows/issue-checker.yml | 84 ------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 .github/workflows/issue-checker.yml (limited to '.github/workflows') diff --git a/.github/workflows/issue-checker.yml b/.github/workflows/issue-checker.yml deleted file mode 100644 index a598488..0000000 --- a/.github/workflows/issue-checker.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: Issue Checker - -on: - issues: - types: [opened, edited] - pull_request_target: - types: [opened, edited] - -permissions: - issues: write - pull-requests: write - -jobs: - check: - runs-on: ubuntu-latest - steps: - - name: Check and Label Issues - uses: actions/github-script@v7 - with: - script: | - const issue = context.payload.issue || context.payload.pull_request; - if (!issue) return; - - const body = issue.body || ''; - const title = issue.title || ''; - const isIssue = !!context.payload.issue; - const issueNumber = issue.number; - - // Skip if "I have not read carefully" is checked - handled by issue-checkbox-checker.yml - const hasNotReadChecked = - body.includes('- [x] I have not read carefully') || - body.includes('- [X] I have not read carefully') || - body.includes('- [x] 我未仔细阅读') || - body.includes('- [X] 我未仔细阅读'); - - if (hasNotReadChecked) { - // Let issue-checkbox-checker handle this - return; - } - - const labels = []; - - // Platform labels - if (body.match(/Windows|windows/i)) labels.push('platform: windows'); - if (body.match(/macOS|macos|Mac/i)) labels.push('platform: macos'); - if (body.match(/Linux|linux|Ubuntu|Debian|Arch|Fedora/i)) labels.push('platform: linux'); - - // Mod loader labels - if (body.match(/Fabric/i)) labels.push('mod-loader: fabric'); - if (body.match(/Forge/i)) labels.push('mod-loader: forge'); - - // Java related - if (body.match(/Java|java|JRE|JDK/i)) labels.push('java'); - - // Authentication issues - if (body.match(/login|authentication|Microsoft|Xbox|account/i)) labels.push('authentication'); - - // Download issues - if (body.match(/download|downloading|assets|libraries/i)) labels.push('download'); - - // Launch issues - if (body.match(/launch|start|won't start|crash|crashed/i)) labels.push('launch'); - - // UI issues - if (body.match(/UI|interface|display|rendering|visual/i)) labels.push('ui'); - - // Performance issues - if (body.match(/slow|performance|lag|freeze|hang/i)) labels.push('performance'); - - // Check for unclear titles - if (isIssue && (title.length < 10 || - title.match(/^(help|问题|stuck|卡住|error|错误|bug)$/i))) { - labels.push('needs-clarification'); - } - - // Apply labels - if (labels.length > 0) { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issue.number, - labels: labels - }); - } -- cgit v1.2.3-70-g09d2 From c3a0bef0767aec88fdd619199bed4bad6b57057c Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 14:55:17 +0800 Subject: feat: enhance CI workflow by adding Node.js, pnpm, and Tauri CLI installation Updated the GitHub Actions workflow to include steps for installing Node.js and pnpm, as well as the Tauri CLI. Added commands to install frontend dependencies and build the application for different operating systems, ensuring a more robust and comprehensive CI process. --- .github/workflows/test.yml | 58 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5440cd8..ebf0b91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,6 +65,23 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Install Frontend Dependencies + working-directory: ./ui + run: pnpm install + + - name: Install Tauri CLI + run: cargo install tauri-cli + - name: Rust Cache uses: swatinem/rust-cache@v2 with: @@ -74,6 +91,41 @@ jobs: working-directory: ./src-tauri run: cargo test --verbose - - name: Build (Dev) - working-directory: ./src-tauri - run: cargo build --verbose + - name: Build App (Debug) + run: cargo tauri build --debug + + - name: Get Short SHA + id: slug + run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT + + - name: Upload Artifact (Linux) + if: runner.os == 'Linux' + uses: actions/upload-artifact@v4 + with: + name: dropout-linux-${{ matrix.wayland && 'arch' || 'ubuntu' }}-${{ steps.slug.outputs.sha8 }} + path: | + src-tauri/target/debug/bundle/appimage/*.AppImage + src-tauri/target/debug/bundle/deb/*.deb + src-tauri/target/debug/dropout + retention-days: 5 + + - name: Upload Artifact (Windows) + if: runner.os == 'Windows' + uses: actions/upload-artifact@v4 + with: + name: dropout-windows-${{ steps.slug.outputs.sha8 }} + path: | + src-tauri/target/debug/bundle/msi/*.msi + src-tauri/target/debug/bundle/nsis/*.exe + src-tauri/target/debug/dropout.exe + retention-days: 5 + + - name: Upload Artifact (macOS) + if: runner.os == 'macOS' + uses: actions/upload-artifact@v4 + with: + name: dropout-macos-${{ steps.slug.outputs.sha8 }} + path: | + src-tauri/target/debug/bundle/dmg/*.dmg + src-tauri/target/debug/bundle/macos/DropOut.app + retention-days: 5 -- cgit v1.2.3-70-g09d2 From 066ffc6ecf27a531dbab76195230dae671ed3a0f Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 14:55:44 +0800 Subject: chore: update Node.js and pnpm versions in CI workflow Modified the GitHub Actions workflow to upgrade Node.js from version 20 to 22 and pnpm from version 8 to 9, ensuring compatibility with the latest features and improvements. --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ebf0b91..1f7f055 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -68,12 +68,12 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 - name: Install pnpm uses: pnpm/action-setup@v2 with: - version: 8 + version: 9 - name: Install Frontend Dependencies working-directory: ./ui -- cgit v1.2.3-70-g09d2 From 252618d3a5ab102498b7ee6d84e0c4afd3a0193c Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 15:00:22 +0800 Subject: chore: update CI workflow to improve dependency installation Modified the GitHub Actions workflow to ensure the 'apt-get update' command does not fail and added 'libfuse2' to the list of installed dependencies for Ubuntu, enhancing the reliability of the CI process. --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f7f055..2d0453f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,8 +45,8 @@ jobs: - name: Install Dependencies (Ubuntu) if: runner.os == 'Linux' && !matrix.wayland run: | - sudo apt-get update - sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev + sudo apt-get update || true + sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libfuse2 - name: Install Dependencies (Arch Linux) if: matrix.wayland -- cgit v1.2.3-70-g09d2 From ddf10db485ea125df92d87955f110f46c0c1e7a0 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 15:03:19 +0800 Subject: chore: refine CI workflow to conditionally execute steps based on event type Updated the GitHub Actions workflow to conditionally run installation and build steps only when triggered by a 'workflow_dispatch' event. This change optimizes the workflow by separating build processes for push/PR events and manual triggers, enhancing clarity and efficiency in CI operations. --- .github/workflows/test.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2d0453f..8bf6d2f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,20 +66,24 @@ jobs: uses: dtolnay/rust-toolchain@stable - name: Install Node.js + if: github.event_name == 'workflow_dispatch' uses: actions/setup-node@v4 with: node-version: 22 - name: Install pnpm + if: github.event_name == 'workflow_dispatch' uses: pnpm/action-setup@v2 with: version: 9 - name: Install Frontend Dependencies + if: github.event_name == 'workflow_dispatch' working-directory: ./ui run: pnpm install - name: Install Tauri CLI + if: github.event_name == 'workflow_dispatch' run: cargo install tauri-cli - name: Rust Cache @@ -91,15 +95,22 @@ jobs: working-directory: ./src-tauri run: cargo test --verbose + - name: Build Rust Only (Push/PR) + if: github.event_name != 'workflow_dispatch' + working-directory: ./src-tauri + run: cargo build --verbose + - name: Build App (Debug) + if: github.event_name == 'workflow_dispatch' run: cargo tauri build --debug - name: Get Short SHA + if: github.event_name == 'workflow_dispatch' id: slug run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT - name: Upload Artifact (Linux) - if: runner.os == 'Linux' + if: runner.os == 'Linux' && github.event_name == 'workflow_dispatch' uses: actions/upload-artifact@v4 with: name: dropout-linux-${{ matrix.wayland && 'arch' || 'ubuntu' }}-${{ steps.slug.outputs.sha8 }} @@ -110,7 +121,7 @@ jobs: retention-days: 5 - name: Upload Artifact (Windows) - if: runner.os == 'Windows' + if: runner.os == 'Windows' && github.event_name == 'workflow_dispatch' uses: actions/upload-artifact@v4 with: name: dropout-windows-${{ steps.slug.outputs.sha8 }} @@ -121,7 +132,7 @@ jobs: retention-days: 5 - name: Upload Artifact (macOS) - if: runner.os == 'macOS' + if: runner.os == 'macOS' && github.event_name == 'workflow_dispatch' uses: actions/upload-artifact@v4 with: name: dropout-macos-${{ steps.slug.outputs.sha8 }} -- cgit v1.2.3-70-g09d2 From 6beecb0dc8854ae2ed79da4a2be6e8bd895349e0 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 15:37:26 +0800 Subject: chore: update pre-commit configuration and remove unnecessary dependencies Modified the .pre-commit-config.yaml to include additional hooks and reorganized the repository structure. Updated pyproject.toml to remove the pre-commit dependency, streamlining the project configuration. --- .github/workflows/prek.yml | 22 ++++++++++++++++++++++ .pre-commit-config.yaml | 16 ++++++++++++---- pyproject.toml | 4 +--- 3 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/prek.yml (limited to '.github/workflows') diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml new file mode 100644 index 0000000..094ebf9 --- /dev/null +++ b/.github/workflows/prek.yml @@ -0,0 +1,22 @@ +name: Prek Checks + +on: + push: + branches: ["main", "dev"] + pull_request: + branches: ["main", "dev"] + workflow_dispatch: + +permissions: + contents: read + +jobs: + prek: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Run prek + uses: j178/prek-action@v1 + with: + all_files: ${{ github.event_name == 'pull_request' }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 01d4add..0a9b345 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,22 @@ +minimum_prek_version: '0.2.28' + repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + - repo: builtin hooks: - - id: check-ast - - id: check-case-conflict - id: check-json exclude: ^ui/tsconfig.*\.json$ - id: check-toml - id: check-yaml + - id: check-case-conflict - id: fix-byte-order-marker + - id: end-of-file-fixer + - id: check-merge-conflict + - id: detect-private-key + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-ast - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.1.6 diff --git a/pyproject.toml b/pyproject.toml index 10e6bbf..d49374f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,9 +4,7 @@ dynamic = ["version"] description = "DropOut is a modern, minimalist, and efficient Minecraft launcher built with the latest web and system technologies. It leverages Tauri v2 to deliver a lightweight application with a robust Rust backend and a reactive Svelte 5 frontend." readme = "README.md" requires-python = ">=3.10" -dependencies = [ - "pre-commit>=4.5.1", -] +dependencies = [] [build-system] requires = ["hatchling"] -- cgit v1.2.3-70-g09d2 From beeb032bb4e92262a989ac968040300b93daac21 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 15:41:18 +0800 Subject: chore: update CI workflow to simplify formatting step Modified the GitHub Actions workflow to change the formatting command from a check to a direct format execution, streamlining the process in the CI pipeline. --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 1280ad7..ba8ce54 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -40,6 +40,6 @@ jobs: - run: pnpm lint working-directory: ui - - run: pnpm format --check + - run: pnpm format working-directory: ui -- cgit v1.2.3-70-g09d2 From 15439e41644a17b4ef889e78474025d54ac4b6c7 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 15:48:14 +0800 Subject: chore: enhance prek workflow to support auto-fixing and commit changes Updated the GitHub Actions workflow to enable automatic fixes for issues detected by the prek action. Added a conditional step to commit changes made by prek, improving the CI process by ensuring that fixes are applied directly to the repository. --- .github/workflows/prek.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml index 094ebf9..88c9be3 100644 --- a/.github/workflows/prek.yml +++ b/.github/workflows/prek.yml @@ -3,20 +3,35 @@ name: Prek Checks on: push: branches: ["main", "dev"] - pull_request: - branches: ["main", "dev"] workflow_dispatch: permissions: - contents: read + contents: write jobs: prek: runs-on: ubuntu-latest + # Skip if commit message contains [skip ci] (to avoid loops with pre-commit.ci) + if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 - - name: Run prek + - name: Run prek (auto-fix) + id: prek uses: j178/prek-action@v1 + continue-on-error: true + with: + all_files: true + + - name: Commit fixes + if: steps.prek.outcome == 'failure' + uses: stefanzweifel/git-auto-commit-action@v5 with: - all_files: ${{ github.event_name == 'pull_request' }} + commit_message: "chore: apply prek auto-fixes [skip ci]" + commit_user_name: "pre-commit bot" + commit_user_email: "pre-commit-bot@users.noreply.github.com" + skip_dirty_check: true -- cgit v1.2.3-70-g09d2 From 521ca11bdb97523b08fa255be015cd9da19f8895 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 15:50:59 +0800 Subject: chore: update prek workflow bot user details Changed the commit user name and email for the prek auto-fix action in the GitHub Actions workflow to reflect the new bot identity, enhancing clarity in commit history. --- .github/workflows/prek.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml index 88c9be3..cc3b4f9 100644 --- a/.github/workflows/prek.yml +++ b/.github/workflows/prek.yml @@ -32,6 +32,6 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "chore: apply prek auto-fixes [skip ci]" - commit_user_name: "pre-commit bot" - commit_user_email: "pre-commit-bot@users.noreply.github.com" + commit_user_name: "hydroroll-bot" + commit_user_email: "bot@hydroroll.team" skip_dirty_check: true -- cgit v1.2.3-70-g09d2 From d5a00cca455c6274deeb6bfdd62a6493b41699cb Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 15:53:50 +0800 Subject: chore: enhance prek workflow with Rust installation and system dependencies Added steps to the GitHub Actions workflow for installing Rust and necessary system dependencies on Linux, improving the environment setup for the prek auto-fix action. --- .github/workflows/prek.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml index cc3b4f9..f002c8a 100644 --- a/.github/workflows/prek.yml +++ b/.github/workflows/prek.yml @@ -20,6 +20,22 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install system dependencies + if: runner.os == 'Linux' + run: | + sudo apt-get update || true + sudo apt-get install -y \ + libwebkit2gtk-4.1-dev \ + build-essential \ + libssl-dev \ + libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + pkg-config + - name: Run prek (auto-fix) id: prek uses: j178/prek-action@v1 -- cgit v1.2.3-70-g09d2 From b2f5c7b40a2e372f185b5818901a4234a61527c8 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 16:02:45 +0800 Subject: chore: refine prek workflow by removing skip ci comment Removed the commented line that instructed to skip the CI process based on commit messages, streamlining the workflow configuration for clarity and maintainability. --- .github/workflows/prek.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml index f002c8a..b49447d 100644 --- a/.github/workflows/prek.yml +++ b/.github/workflows/prek.yml @@ -11,7 +11,6 @@ permissions: jobs: prek: runs-on: ubuntu-latest - # Skip if commit message contains [skip ci] (to avoid loops with pre-commit.ci) if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: - name: Checkout code @@ -42,7 +41,7 @@ jobs: continue-on-error: true with: all_files: true - + - name: Commit fixes if: steps.prek.outcome == 'failure' uses: stefanzweifel/git-auto-commit-action@v5 -- cgit v1.2.3-70-g09d2 From 756c60e51967189c6e37166011927bbe219c0352 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 20:33:49 +0800 Subject: chore: enhance GitHub Actions workflow to check for changes before committing fixes Updated the GitHub Actions workflow to include a step that checks for changes before committing auto-fixes. This ensures that commits are only made when there are actual changes, improving the efficiency of the workflow. --- .github/workflows/prek.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml index b49447d..4312e97 100644 --- a/.github/workflows/prek.yml +++ b/.github/workflows/prek.yml @@ -42,8 +42,18 @@ jobs: with: all_files: true - - name: Commit fixes + - name: Check for changes + id: check_changes if: steps.prek.outcome == 'failure' + run: | + if [ -n "$(git status --porcelain)" ]; then + echo "has_changes=true" >> $GITHUB_OUTPUT + else + echo "has_changes=false" >> $GITHUB_OUTPUT + fi + + - name: Commit fixes + if: steps.prek.outcome == 'failure' && steps.check_changes.outputs.has_changes == 'true' uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "chore: apply prek auto-fixes [skip ci]" -- cgit v1.2.3-70-g09d2 From 122beeee28a8e07caaa88634d3f09cfc53f55a61 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 20:35:50 +0800 Subject: chore: simplify GitHub Actions workflow by removing unnecessary auto-fix option Updated the GitHub Actions workflow to remove the 'all_files' option from the prek action, streamlining the process and ensuring that the action runs without additional parameters. This change enhances clarity and maintains the workflow's efficiency. --- .github/workflows/prek.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml index 4312e97..8e43763 100644 --- a/.github/workflows/prek.yml +++ b/.github/workflows/prek.yml @@ -35,12 +35,10 @@ jobs: librsvg2-dev \ pkg-config - - name: Run prek (auto-fix) + - name: Run prek id: prek uses: j178/prek-action@v1 continue-on-error: true - with: - all_files: true - name: Check for changes id: check_changes -- cgit v1.2.3-70-g09d2