github-issue-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub 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:
-
Identify Issue Type: Determine if the request is a bug report, feature request, or other category.
-
Locate Template: Search for issue templates in.
.github/ISSUE_TEMPLATE/bug_report.ymlfeature_request.ymlwebsite_issue.yml- If no relevant YAML template is found, look for templates in the same directory.
.md
-
Read Template: Read the content of the identified template file to understand the required fields.
-
Draft Content: Draft the issue title and body/fields.
- If using a YAML template (form), prepare values for each defined in the template.
id - If using a Markdown template, follow its structure exactly.
- Default Label: Always include the label unless the user explicitly requests otherwise.
🔒 maintainer only
- If using a YAML template (form), prepare values for each
-
Create Issue: Use theCLI to create the issue.
gh- 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): Whilesupportsgh issue create, 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-fileor--bodyif the form has been converted to a standard body, OR to use the--body-fileflags for YAML forms.--fieldNote: For therepository 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.gemini-cli -
Verify: Confirm the issue was created successfully and provide the link to the user.
按照以下步骤创建GitHub Issue:
-
确定Issue类型:判断需求属于bug报告、功能需求还是其他类别。
-
查找模板:在目录下搜索Issue模板。
.github/ISSUE_TEMPLATE/bug_report.ymlfeature_request.ymlwebsite_issue.yml- 如果未找到相关YAML模板,可在同一目录下查找格式的模板。
.md
-
阅读模板:查看所选模板文件的内容,了解必填字段。
-
撰写内容:草拟Issue标题和正文/字段内容。
- 如果使用YAML模板(表单形式),为模板中定义的每个准备对应的值。
id - 如果使用Markdown模板,严格遵循其结构撰写。
- 默认标签:除非用户明确要求,否则务必添加标签。
🔒 maintainer only
- 如果使用YAML模板(表单形式),为模板中定义的每个
-
创建Issue:使用CLI工具创建Issue。
gh- 重要提示:为避免多行Markdown或复杂文本出现转义和格式问题,务必先将描述/正文内容写入临时文件。
针对Markdown模板或简单正文:bash# 1. 将草拟的内容写入临时文件 # 2. 使用--body-file参数创建Issue gh issue create --title "简洁标题" --body-file <临时文件路径> --label "🔒 maintainer only" # 3. 删除临时文件 rm <临时文件路径>针对YAML模板(表单形式): 虽然支持gh issue create参数,但YAML表单通常期望通过参数传递键值对以跳过交互式提示。不过,对于长文本字段,最可靠的非交互式方式是将表单转换为标准正文后使用--body-file或--body参数,或者针对YAML表单使用--body-file参数。--field注意:对于使用YAML表单的仓库,如果自动化流程不要求基于字段提交,通常可以将内容作为单个正文提交。gemini-cli -
验证:确认Issue已成功创建,并将链接提供给用户。
Principles
原则
- Clarity: Titles should be descriptive and follow project conventions.
- Defensive Formatting: Always use temporary files with to prevent newline and special character issues.
--body-file - 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 - 维护者优先级:默认使用内部/维护者标签,以便有序管理待办事项。
- 完整性:提供所有要求的信息(如版本信息、复现步骤等)。