From 5d520eedf4a731881a3468cad18aa0d07c0cf937 Mon Sep 17 00:00:00 2001 From: guantw Date: Fri, 28 Aug 2026 16:12:50 +0800 Subject: [PATCH] chore: add contribution templates and trim CI matrix --- .github/ISSUE_TEMPLATE/bug_report.yml | 67 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 30 ++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 18 ++++++ .github/workflows/ci.yml | 2 +- 5 files changed, 121 insertions(+), 1 deletion(-) 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..0803f09 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,67 @@ +name: Bug report +description: 报告可复现的功能问题 +title: "[Bug] " +labels: + - bug +body: + - type: markdown + attributes: + value: | + 不要上传 token、证书、私钥、完整敏感日志、设备 UDID 或用户 HAP。 + 安全漏洞请按 SECURITY.md 使用私密渠道。 + - type: input + id: version + attributes: + label: HapSign 版本 + description: 版本号、commit 或 Release 名称 + validations: + required: true + - type: dropdown + id: distribution + attributes: + label: 运行方式 + options: + - Windows 精简便携包 + - Windows Chromium 兼容包 + - Python 源码 GUI + - Python CLI + - 其他 + validations: + required: true + - type: input + id: environment + attributes: + label: 环境 + description: Windows/macOS/Linux 版本、显示缩放、DevEco/SDK 版本(若相关) + validations: + required: true + - type: textarea + id: steps + attributes: + label: 复现步骤 + placeholder: | + 1. … + 2. … + 3. … + validations: + required: true + - type: textarea + id: expected + attributes: + label: 预期结果 + validations: + required: true + - type: textarea + id: actual + attributes: + label: 实际结果与已脱敏日志 + description: 请先关闭敏感诊断,删除 token、账号、UDID、路径用户名等信息。 + validations: + required: true + - type: checkboxes + id: safety + attributes: + label: 提交确认 + options: + - label: 我已确认内容不含账号凭据、私钥、UDID、用户 HAP 或其他敏感数据。 + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ba373da --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Security policy + url: https://github.com/guantw/HapSign/security/policy + about: 安全问题不要提交公开 Issue,请先阅读私密报告方式。 diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..4eb8e41 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,30 @@ +name: Feature request +description: 建议一个新功能或体验改进 +title: "[Feature] " +labels: + - enhancement +body: + - type: textarea + id: problem + attributes: + label: 要解决的问题 + description: 请描述使用场景,而不只是期望的实现方式。 + validations: + required: true + - type: textarea + id: proposal + attributes: + label: 建议方案 + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: 考虑过的替代方案 + - type: checkboxes + id: scope + attributes: + label: 范围确认 + options: + - label: 此需求用于合法的本机开发或调试场景。 + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..a1a8815 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,18 @@ +## 变更 + +简要说明问题、实现和用户可见行为。 + +## 验证 + +- [ ] `python -m ruff format --check .` +- [ ] `python -m ruff check .` +- [ ] `python -m pytest --cov` +- [ ] 新增或修复逻辑已有不依赖真实账号/设备的测试 +- [ ] 用户可见变化已写入 `CHANGELOG.md` +- [ ] 未提交 token、证书、私钥、UDID、HAP、日志或本机配置 +- [ ] 新增依赖已更新 `THIRD_PARTY_NOTICES.md` +- [ ] 涉及便携包时已检查 `docs/OPEN_SOURCE_RELEASE.md` + +## 手动测试 + +列出真实设备、登录、GUI 或冻结版验证;不适用时说明原因。 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c7753f..0e6a005 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: os: [windows-latest, macos-latest] - python-version: ["3.11", "3.12", "3.13"] + python-version: ["3.11", "3.13"] runs-on: ${{ matrix.os }}