github-issues
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYou create, update, query, and comment on GitHub issues. Infer the project's language variant (US/UK English) from existing issues, docs, and code, and match it in all output.
Read individual rule files in for detailed requirements and examples.
rules/你可以创建、更新、查询以及评论GitHub Issue。从现有Issue、文档和代码中推断项目的语言变体(美式/英式英语),并在所有输出中保持一致。
请查阅目录下的单个规则文件以获取详细要求和示例。
rules/Rules Overview
规则概述
| Rule | Impact | File |
|---|---|---|
| Issue title | HIGH | |
| Template adherence | MEDIUM | |
| 规则 | 影响程度 | 文件 |
|---|---|---|
| Issue标题 | 高 | |
| 模板合规性 | 中 | |
Workflow
工作流程
- Determine action: create, update, query, or comment
- Check if we're in a GitHub repository and get owner/repo info
- Check for issue templates in or
.github/ISSUE_TEMPLATE/.github/ - For creation:
- Check for organisation issue types via (fails for user-owned repos — expected, proceed without)
github/list_issue_types - Generate title following
rules/issue-title.md - Generate body following template if found (see ), otherwise use clear structured format
rules/template-adherence.md - Get current user via for self-assignment
github/get_me - Create issue via with
github/issue_write, includingmethod: "create"array with current user's loginassignees
- Check for organisation issue types via
- For updates:
- Identify issue number from user input
- Fetch current issue details via
mcp__github__get_issue - Determine fields to update (title, body, labels, assignees, state)
- Apply updates using with
mcp__github__issue_writemethod: "update"
- For queries:
- Use for a specific issue number
mcp__github__get_issue - Use for filters, keywords, and cross-repo lookups
mcp__github__search_issues - Use for repository issue lists
mcp__github__list_issues
- Use
- For comments:
- Fetch issue context first when needed via
mcp__github__get_issue - Add the comment using
mcp__github__add_issue_comment
- Fetch issue context first when needed via
- Display a summary with issue links and what changed
- 确定操作类型:创建、更新、查询或评论
- 检查当前是否处于GitHub仓库中,并获取仓库所有者/仓库信息
- 在或
.github/ISSUE_TEMPLATE/目录下检查是否存在Issue模板.github/ - 创建Issue时:
- 通过检查组织的Issue类型(对于个人仓库会失败,此为预期情况,可跳过继续)
github/list_issue_types - 按照生成标题
rules/issue-title.md - 如果找到模板,按照模板生成内容(详见);否则使用清晰的结构化格式
rules/template-adherence.md - 通过获取当前用户信息以进行自我指派
github/get_me - 使用并设置
github/issue_write来创建Issue,在method: "create"数组中包含当前用户的登录名assignees
- 通过
- 更新Issue时:
- 从用户输入中识别Issue编号
- 通过获取当前Issue的详细信息
mcp__github__get_issue - 确定需要更新的字段(标题、内容、标签、负责人、状态)
- 使用并设置
mcp__github__issue_write来应用更新method: "update"
- 查询Issue时:
- 对于特定Issue编号,使用
mcp__github__get_issue - 如需筛选、关键词搜索或跨仓库查询,使用
mcp__github__search_issues - 如需获取仓库的Issue列表,使用
mcp__github__list_issues
- 对于特定Issue编号,使用
- 评论Issue时:
- 必要时先通过获取Issue上下文
mcp__github__get_issue - 使用添加评论
mcp__github__add_issue_comment
- 必要时先通过
- 显示包含Issue链接和变更内容的摘要
Validation
验证规则
- For titles: follow
rules/issue-title.md - For body with template: follow
rules/template-adherence.md - For labels: only use labels that already exist in the repository
- For assignees: only assign valid repository collaborators
- 标题:遵循中的要求
rules/issue-title.md - 带模板的内容:遵循中的要求
rules/template-adherence.md - 标签:仅使用仓库中已存在的标签
- 负责人:仅指派给仓库的有效协作者