github-issue-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

GitHub Issue Creator

GitHub Issue 创建工具

This skill guides the creation of high-quality GitHub issues that adhere to the repository's standards and use the appropriate templates.
此技能可指导你创建符合仓库标准、使用合适模板的高质量GitHub Issue。

Workflow

工作流程

Follow these steps to create a GitHub issue:
  1. Identify Issue Type: Determine if the request is a bug report, feature request, or other category.
  2. Locate Template: Search for issue templates in
    .github/ISSUE_TEMPLATE/
    .
    • bug_report.yml
    • feature_request.yml
    • website_issue.yml
    • If no relevant YAML template is found, look for
      .md
      templates in the same directory.
  3. Read Template: Read the content of the identified template file to understand the required fields.
  4. Draft Content: Draft the issue title and body/fields.
    • If using a YAML template (form), prepare values for each
      id
      defined in the template.
    • If using a Markdown template, follow its structure exactly.
    • Default Label: Always include the
      🔒 maintainer only
      label unless the user explicitly requests otherwise.
  5. Create Issue: Use the
    gh
    CLI to create the issue.
    • CRITICAL: To avoid shell escaping and formatting issues with multi-line Markdown or complex text, ALWAYS write the description/body to a temporary file first.
    For Markdown Templates or Simple Body:
    bash
    # 1. Write the drafted content to a temporary file
    # 2. Create the issue using the --body-file flag
    gh issue create --title "Succinct title" --body-file <temp_file_path> --label "🔒 maintainer only"
    # 3. Remove the temporary file
    rm <temp_file_path>
    For YAML Templates (Forms): While
    gh issue create
    supports
    --body-file
    , YAML forms usually expect key-value pairs via flags if you want to bypass the interactive prompt. However, the most reliable non-interactive way to ensure formatting is preserved for long text fields is to use the
    --body
    or
    --body-file
    if the form has been converted to a standard body, OR to use the
    --field
    flags for YAML forms.
    Note: For the
    gemini-cli
    repository which uses YAML forms, you can often submit the content as a single body if a specific field-based submission is not required by the automation.
  6. Verify: Confirm the issue was created successfully and provide the link to the user.
按照以下步骤创建GitHub Issue:
  1. 确定Issue类型:判断需求属于bug报告、功能需求还是其他类别。
  2. 查找模板:在
    .github/ISSUE_TEMPLATE/
    目录下搜索Issue模板。
    • bug_report.yml
    • feature_request.yml
    • website_issue.yml
    • 如果未找到相关YAML模板,可在同一目录下查找
      .md
      格式的模板。
  3. 阅读模板:查看所选模板文件的内容,了解必填字段。
  4. 撰写内容:草拟Issue标题和正文/字段内容。
    • 如果使用YAML模板(表单形式),为模板中定义的每个
      id
      准备对应的值。
    • 如果使用Markdown模板,严格遵循其结构撰写。
    • 默认标签:除非用户明确要求,否则务必添加
      🔒 maintainer only
      标签。
  5. 创建Issue:使用
    gh
    CLI工具创建Issue。
    • 重要提示:为避免多行Markdown或复杂文本出现转义和格式问题,务必先将描述/正文内容写入临时文件。
    针对Markdown模板或简单正文:
    bash
    # 1. 将草拟的内容写入临时文件
    # 2. 使用--body-file参数创建Issue
    gh issue create --title "简洁标题" --body-file <临时文件路径> --label "🔒 maintainer only"
    # 3. 删除临时文件
    rm <临时文件路径>
    针对YAML模板(表单形式): 虽然
    gh issue create
    支持
    --body-file
    参数,但YAML表单通常期望通过参数传递键值对以跳过交互式提示。不过,对于长文本字段,最可靠的非交互式方式是将表单转换为标准正文后使用
    --body
    --body-file
    参数,或者针对YAML表单使用
    --field
    参数。
    注意:对于使用YAML表单的
    gemini-cli
    仓库,如果自动化流程不要求基于字段提交,通常可以将内容作为单个正文提交。
  6. 验证:确认Issue已成功创建,并将链接提供给用户。

Principles

原则

  • Clarity: Titles should be descriptive and follow project conventions.
  • Defensive Formatting: Always use temporary files with
    --body-file
    to prevent newline and special character issues.
  • Maintainer Priority: Default to internal/maintainer labels to keep the backlog organized.
  • Completeness: Provide all requested information (e.g., version info, reproduction steps).
  • 清晰性:标题应具有描述性,且符合项目惯例。
  • 防御性格式化:始终使用
    --body-file
    结合临时文件,避免换行符和特殊字符引发问题。
  • 维护者优先级:默认使用内部/维护者标签,以便有序管理待办事项。
  • 完整性:提供所有要求的信息(如版本信息、复现步骤等)。