From b036a51eef19986a2db9953d47e56166eb49cc51 Mon Sep 17 00:00:00 2001 From: lezi-fun <177434121+lezi-fun@users.noreply.github.com> Date: Fri, 14 Aug 2026 09:31:55 +0800 Subject: [PATCH 1/2] feat: add bilingual PR and issue templates with branch selection --- .github/ISSUE_TEMPLATE/bug_report.yml | 90 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.yml | 65 ++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 52 +++++++++++++ 4 files changed, 208 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/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..14a8bf0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,90 @@ +name: 🐛 Bug 报告 / Bug Report +description: 报告一个 Bug / Report a bug +title: "[Bug] " +labels: [bug] +body: + - type: markdown + attributes: + value: | + ## 感谢你报告问题!/ Thanks for reporting an issue! + 请填写以下信息,帮助我们快速定位问题。/ Please fill in the following information to help us locate the issue quickly. + + - type: dropdown + id: branch + attributes: + label: 你使用的是哪个分支?/ Which branch are you using? + description: 请选择你所使用的分支。/ Please select the branch you are using. + options: + - Lite(原生单文件版 / Original single-file version) + - next(Next.js 16 版 / Next.js 16 version) + validations: + required: true + + - type: input + id: version + attributes: + label: 后台版本号 / Backend version (管理员填写 / admins only) + description: | + 如果你使用的是 next 分支且是管理员,请粘贴后台显示的版本号。其他情况请留空。 + / If you are using the next branch and are an administrator, please paste the version shown in the admin panel. Leave blank otherwise. + placeholder: "例如 / e.g. 2.0.0" + validations: + required: false + + - type: textarea + id: description + attributes: + label: 问题描述 / Description + description: 请清晰描述你遇到的问题。/ Please clearly describe the issue you encountered. + validations: + required: true + + - type: textarea + id: steps + attributes: + label: 复现步骤 / Steps to reproduce + description: 如何复现这个问题?/ How can this issue be reproduced? + placeholder: | + 1. 打开... / Open ... + 2. 点击... / Click ... + 3. 看到错误... / See the error... + validations: + required: true + + - type: textarea + id: expected + attributes: + label: 期望行为 / Expected behavior + description: 你期望发生什么?/ What did you expect to happen? + validations: + required: true + + - type: textarea + id: actual + attributes: + label: 实际行为 / Actual behavior + description: 实际发生了什么?/ What actually happened? + validations: + required: true + + - type: textarea + id: environment + attributes: + label: 环境信息 / Environment + description: 你的运行环境。/ Your running environment. + placeholder: | + - 操作系统 / OS: + - 浏览器 / Browser: + - Node.js 版本 / Node.js version: + - 部署方式 / Deployment method (Docker / 源码 / Source): + validations: + required: false + + - type: textarea + id: logs + attributes: + label: 日志 / Logs + description: 如有报错日志,请粘贴于此。/ Paste any error logs here if available. + render: shell + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..168b4ed --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,65 @@ +name: ✨ 功能建议 / Feature Request +description: 提出一个新功能或改进建议 / Suggest an idea for this project +title: "[Feature] " +labels: [enhancement] +body: + - type: markdown + attributes: + value: | + ## 感谢你的建议!/ Thanks for your suggestion! + 请填写以下信息,让我们了解你的想法。/ Please fill in the information below to help us understand your idea. + + - type: dropdown + id: branch + attributes: + label: 这个功能针对哪个分支?/ Which branch is this feature for? + description: 请选择你所使用的分支。/ Please select the branch you are using. + options: + - Lite(原生单文件版 / Original single-file version) + - next(Next.js 16 版 / Next.js 16 version) + validations: + required: true + + - type: input + id: version + attributes: + label: 后台版本号 / Backend version (管理员填写 / admins only) + description: | + 如果你使用的是 next 分支且是管理员,请粘贴后台显示的版本号。其他情况请留空。 + / If you are using the next branch and are an administrator, please paste the version shown in the admin panel. Leave blank otherwise. + placeholder: "例如 / e.g. 2.0.0" + validations: + required: false + + - type: textarea + id: problem + attributes: + label: 要解决的问题 / Problem to solve + description: 这个功能解决什么问题?/ What problem does this feature solve? + placeholder: "当我...时,我希望... / When I ..., I wish ..." + validations: + required: true + + - type: textarea + id: solution + attributes: + label: 期望的解决方案 / Proposed solution + description: 你希望如何实现?/ How would you like it to work? + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: 替代方案 / Alternatives considered + description: 你考虑过其他方案吗?/ Have you considered any alternative approaches? + validations: + required: false + + - type: textarea + id: additional + attributes: + label: 补充说明 / Additional context + description: 其他任何信息、截图或示例。/ Any other information, screenshots, or examples. + validations: + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..6611390 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,52 @@ +# 感谢你为 Forumlify 提交贡献!/ Thank you for contributing to Forumlify! + + + +## 目标分支 / Target branch + +**你提交的代码是基于哪个分支?/ Which branch is your code based on?** + +- [ ] **Lite**(原生单文件版 / Original single-file version) +- [ ] **next**(Next.js 16 版 / Next.js 16 version) + +> ⚠️ 请确保 PR 的 base 分支与你的代码来源分支一致。/ Please make sure the PR's base branch matches the branch your code comes from. + +## 版本信息 / Version info + + +**后台版本号 / Backend version (admin only):** + +``` +(在此粘贴后台显示的版本号 / Paste the version shown in the admin panel here) +``` + +## 变更内容 / What does this PR do? + + + +- + +## 动机 / Motivation + + + +- + +## 测试 / Testing + + + +- [ ] 本地构建通过 / Local build passes (`npm run build`) +- [ ] 相关功能已手动测试 / Related features manually tested +- [ ] 测试用例已更新 / Tests updated + +## 截图 / Screenshots + + + +## 检查清单 / Checklist + +- [ ] 我已阅读并遵循了贡献指南 / I have read and followed the contributing guidelines +- [ ] 我的代码遵循现有代码风格 / My code follows the existing code style +- [ ] 我已同步最新的上游分支 / I have synced with the latest upstream branch +- [ ] 本 PR 只包含必要的改动 / This PR contains only the necessary changes From 3f7b9dbb9c6c1e7d8fece9f1e463ef93db9dabf6 Mon Sep 17 00:00:00 2001 From: lezi-fun <177434121+lezi-fun@users.noreply.github.com> Date: Fri, 14 Aug 2026 09:38:22 +0800 Subject: [PATCH 2/2] fix: note that npm run build is next-branch only in PR template --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6611390..8a4afb6 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -36,7 +36,7 @@ -- [ ] 本地构建通过 / Local build passes (`npm run build`) +- [ ] 本地构建通过 / Local build passes (`npm run build`,仅 next 分支 / next branch only) - [ ] 相关功能已手动测试 / Related features manually tested - [ ] 测试用例已更新 / Tests updated