From 754e9a5a964e4dda01d217c99804002c61b77f80 Mon Sep 17 00:00:00 2001 From: CN059 Date: Fri, 11 Sep 2026 10:11:36 +0800 Subject: [PATCH] chore: add issue templates for bugs and feature requests --- .github/ISSUE_TEMPLATE/bug_report.yml | 113 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 71 +++++++++++++ 3 files changed, 192 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 diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..cce4595 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,113 @@ +name: Bug 报告 +description: 报告一个可复现的问题 +title: "[Bug]: " +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + 感谢反馈。请尽量填全,信息不足的问题往往要来回好几轮才能定位。 + + **提交前请脱敏**:不要贴真实供应商 Key、token、Cookie 或会话标识。 + + - type: dropdown + id: component + attributes: + label: 涉及的组件 + description: 可多选 + multiple: true + options: + - 入站网关(会话识别与注入) + - 出站网关(供应商适配) + - 强亲和判定与拒绝 + - new-api 渠道透传 + - Web 控制台 + - 部署与编排(Docker / Compose) + - 构建与 CI + - 文档 + validations: + required: true + + - type: input + id: version + attributes: + label: 版本 + description: 发布 tag、镜像 digest,或源码构建时的 `git rev-parse --short HEAD` + placeholder: v0.1.7 + validations: + required: true + + - type: dropdown + id: deployment + attributes: + label: 部署方式 + options: + - Docker Compose(deploy/compose.release.yaml) + - 本地开发环境(just up) + - 裸机 Caddy + xcaddy + - 其他 + validations: + required: true + + - type: input + id: environment + attributes: + label: 运行环境 + description: 操作系统与架构,以及上游 new-api 的版本 + placeholder: linux/arm64,new-api v1.0.0-rc.25 + validations: + required: true + + - type: textarea + id: steps + attributes: + label: 复现步骤 + description: 尽量给出最小可复现步骤;并发或时序相关的问题请说明发生频率 + placeholder: | + 1. 控制台配置入站规则 ... + 2. 发送请求 ... + 3. 观察到 ... + validations: + required: true + + - type: textarea + id: expected + attributes: + label: 期望行为 + validations: + required: true + + - type: textarea + id: actual + attributes: + label: 实际行为 + validations: + required: true + + - type: textarea + id: logs + attributes: + label: 日志与亲和判定结果 + description: Caddy 日志(just logs gateway);若与亲和相关,附 new-api 中该请求的 channel_affinity.key_source / key_fp + render: text + validations: + required: false + + - type: textarea + id: config + attributes: + label: 相关配置(已脱敏) + description: session_affinity 配置块、控制台导出的入站规则,或出站供应商配置 + render: text + validations: + required: false + + - type: checkboxes + id: confirmations + attributes: + label: 提交前确认 + options: + - label: 我已移除真实供应商 Key、token、Cookie 等敏感信息 + required: true + - label: 我已搜索现有 issue 与文档,确认不是重复问题 + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..36093a0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: 部署与配置文档 + url: https://github.com/powercess/affinity-gateway/blob/dev/docs/deployment.md + about: 安装、Compose 编排与供应商接入 + - name: 分支模型与贡献指南 + url: https://github.com/powercess/affinity-gateway/blob/dev/CONTRIBUTING.md + about: 提 PR 之前请先读这里:所有改动都向 dev 分支提 PR diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..df9c350 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,71 @@ +name: 功能建议 +description: 提出一个新功能或改进想法 +title: "[Feature]: " +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + 想法可以很粗,说清「要解决什么问题」比给出完整方案更重要。 + 影响面较大的改动建议先在这里对齐方向,再提 PR。 + + - type: textarea + id: problem + attributes: + label: 要解决的问题 + description: 现在有什么不便?在什么场景下发生? + validations: + required: true + + - type: textarea + id: proposal + attributes: + label: 期望的方案 + description: 你设想的做法;如果还没想清楚,描述期望的最终效果也可以 + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: 备选方案 + description: 考虑过的其他做法,以及为什么不够好 + validations: + required: false + + - type: dropdown + id: scope + attributes: + label: 影响范围 + description: 可多选 + multiple: true + options: + - 入站网关(会话识别与注入) + - 出站网关(供应商适配) + - 强亲和判定与拒绝 + - new-api 渠道透传 + - Web 控制台 + - 部署与编排(Docker / Compose) + - 测试与工具链 + - 文档 + validations: + required: true + + - type: dropdown + id: contribute + attributes: + label: 是否愿意自己提 PR + options: + - 愿意,需要维护者先确认方向 + - 愿意,已阅读 CONTRIBUTING + - 暂时没有精力,仅供参考 + validations: + required: true + + - type: textarea + id: context + attributes: + label: 补充上下文 + description: 参考实现、上游讨论、截图等 + validations: + required: false