Skip to content

bug: Issue 模板未显示在 New Issue 选择器中 #1306

Description

@DavidShawa

发帖前必读

  • 我已经搜索过现有 Issues,没有找到重复。
  • 我已经阅读过 README 和相关文档。
  • 该问题可以在当前仓库的 GitHub Issues 页面稳定复现。

运行环境

项目
操作系统 与操作系统无关
使用环境 GitHub Web
仓库 claude-code-best/claude-code
复现日期 2026-07-22

复现步骤

  1. 打开仓库的 Issues 页面:https://github.com/claude-code-best/claude-code/issues
  2. 点击 New issue
  3. 查看弹出的 Issue 模板选择器。

期望行为

模板选择器中应当显示:

  • Bug 报告
  • 功能建议

用户可以选择相应模板创建 Issue。

实际行为

模板选择器只显示以下入口:

  • Report a security vulnerability
  • 讨论区
  • 项目文档

没有显示 Bug 报告功能建议,同时仓库设置了:

blank_issues_enabled: false

因此用户从仓库的正常 New issue 入口无法创建任何普通 Issue。

通过带 template 参数的直达链接仍然可以创建,例如:

https://github.com/claude-code-best/claude-code/issues/new?template=bug_report.md

原因分析

当前两个 Markdown 模板的 YAML frontmatter 使用了 description

---
name: Bug 报告
description: 报告一个可复现的 bug
---

对于 .md Issue 模板,GitHub 要求使用 about 字段;description 用于 .yml Issue Form。由于模板头信息无效,GitHub 的模板选择器没有识别这些模板。

受影响文件:

  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/ISSUE_TEMPLATE/feature_request.md

建议修复

将两个文件中的 description 改为 about

 name: Bug 报告
-description: 报告一个可复现的 bug
+about: 报告一个可复现的 bug
 name: 功能建议
-description: 提出新功能或改进建议
+about: 提出新功能或改进建议

GitHub 相关文档:

https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates

补充信息

New issue 弹窗中目前仅显示安全报告、讨论区和项目文档。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions