github-issues
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub Issues
GitHub Issues
Manage GitHub issues using the MCP server.
@modelcontextprotocol/server-github使用 MCP服务器管理GitHub Issues。
@modelcontextprotocol/server-githubAvailable MCP Tools
可用的MCP工具
| Tool | Purpose |
|---|---|
| Create new issues |
| Update existing issues |
| Fetch issue details |
| Search issues |
| Add comments |
| List repository issues |
| 工具 | 用途 |
|---|---|
| 创建新工单 |
| 更新现有工单 |
| 获取工单详情 |
| 搜索工单 |
| 添加评论 |
| 列出仓库工单 |
Workflow
工作流
- Determine action: Create, update, or query?
- Gather context: Get repo info, existing labels, milestones if needed
- Structure content: Use appropriate template from references/templates.md
- Execute: Call the appropriate MCP tool
- Confirm: Report the issue URL to user
- 确定操作:创建、更新还是查询?
- 收集上下文:获取仓库信息、现有标签、里程碑(如有需要)
- 组织内容:使用references/templates.md中的对应模板
- 执行:调用合适的MCP工具
- 确认:向用户反馈工单URL
Creating Issues
创建工单
Required Parameters
必填参数
owner: repository owner (org or user)
repo: repository name
title: clear, actionable title
body: structured markdown contentowner: 仓库所有者(组织或用户)
repo: 仓库名称
title: 清晰、可执行的标题
body: 结构化的Markdown内容Optional Parameters
可选参数
labels: ["bug", "enhancement", "documentation", ...]
assignees: ["username1", "username2"]
milestone: milestone number (integer)labels: ["bug", "enhancement", "documentation", ...]
assignees: ["username1", "username2"]
milestone: 里程碑编号(整数)Title Guidelines
标题规范
- Start with type prefix when useful: ,
[Bug],[Feature][Docs] - Be specific and actionable
- Keep under 72 characters
- Examples:
[Bug] Login fails with SSO enabled[Feature] Add dark mode supportAdd unit tests for auth module
- 必要时以类型前缀开头:,
[Bug],[Feature][Docs] - 具体且可执行
- 长度控制在72字符以内
- 示例:
[Bug] Login fails with SSO enabled[Feature] Add dark mode supportAdd unit tests for auth module
Body Structure
正文结构
Always use the templates in references/templates.md. Choose based on issue type:
| User Request | Template |
|---|---|
| Bug, error, broken, not working | Bug Report |
| Feature, enhancement, add, new | Feature Request |
| Task, chore, refactor, update | Task |
请始终使用references/templates.md中的模板,根据工单类型选择:
| 用户请求 | 模板 |
|---|---|
| Bug、错误、功能异常、无法使用 | Bug报告模板 |
| 新功能、功能优化、新增需求 | 功能请求模板 |
| 任务、杂活、重构、更新 | 任务模板 |
Updating Issues
更新工单
Use with:
mcp__github__update_issueowner, repo, issue_number (required)
title, body, state, labels, assignees, milestone (optional - only changed fields)State values: ,
openclosed使用工具,参数如下:
mcp__github__update_issueowner, repo, issue_number(必填)
title, body, state, labels, assignees, milestone(可选 - 仅传入需要修改的字段)状态值可选:,
openclosedExamples
示例
Example 1: Bug Report
示例1:Bug报告
User: "Create a bug issue - the login page crashes when using SSO"
Action: Call with:
mcp__github__create_issuejson
{
"owner": "github",
"repo": "awesome-copilot",
"title": "[Bug] Login page crashes when using SSO",
"body": "## Description\nThe login page crashes when users attempt to authenticate using SSO.\n\n## Steps to Reproduce\n1. Navigate to login page\n2. Click 'Sign in with SSO'\n3. Page crashes\n\n## Expected Behavior\nSSO authentication should complete and redirect to dashboard.\n\n## Actual Behavior\nPage becomes unresponsive and displays error.\n\n## Environment\n- Browser: [To be filled]\n- OS: [To be filled]\n\n## Additional Context\nReported by user.",
"labels": ["bug"]
}用户:"创建一个bug工单 - 登录页面在使用SSO时崩溃"
操作:调用,参数如下:
mcp__github__create_issuejson
{
"owner": "github",
"repo": "awesome-copilot",
"title": "[Bug] Login page crashes when using SSO",
"body": "## Description\nThe login page crashes when users attempt to authenticate using SSO.\n\n## Steps to Reproduce\n1. Navigate to login page\n2. Click 'Sign in with SSO'\n3. Page crashes\n\n## Expected Behavior\nSSO authentication should complete and redirect to dashboard.\n\n## Actual Behavior\nPage becomes unresponsive and displays error.\n\n## Environment\n- Browser: [To be filled]\n- OS: [To be filled]\n\n## Additional Context\nReported by user.",
"labels": ["bug"]
}Example 2: Feature Request
示例2:功能请求
User: "Create a feature request for dark mode with high priority"
Action: Call with:
mcp__github__create_issuejson
{
"owner": "github",
"repo": "awesome-copilot",
"title": "[Feature] Add dark mode support",
"body": "## Summary\nAdd dark mode theme option for improved user experience and accessibility.\n\n## Motivation\n- Reduces eye strain in low-light environments\n- Increasingly expected by users\n- Improves accessibility\n\n## Proposed Solution\nImplement theme toggle with system preference detection.\n\n## Acceptance Criteria\n- [ ] Toggle switch in settings\n- [ ] Persists user preference\n- [ ] Respects system preference by default\n- [ ] All UI components support both themes\n\n## Alternatives Considered\nNone specified.\n\n## Additional Context\nHigh priority request.",
"labels": ["enhancement", "high-priority"]
}用户:"创建一个高优先级的深色模式功能请求"
操作:调用,参数如下:
mcp__github__create_issuejson
{
"owner": "github",
"repo": "awesome-copilot",
"title": "[Feature] Add dark mode support",
"body": "## Summary\nAdd dark mode theme option for improved user experience and accessibility.\n\n## Motivation\n- Reduces eye strain in low-light environments\n- Increasingly expected by users\n- Improves accessibility\n\n## Proposed Solution\nImplement theme toggle with system preference detection.\n\n## Acceptance Criteria\n- [ ] Toggle switch in settings\n- [ ] Persists user preference\n- [ ] Respects system preference by default\n- [ ] All UI components support both themes\n\n## Alternatives Considered\nNone specified.\n\n## Additional Context\nHigh priority request.",
"labels": ["enhancement", "high-priority"]
}Common Labels
常用标签
Use these standard labels when applicable:
| Label | Use For |
|---|---|
| Something isn't working |
| New feature or improvement |
| Documentation updates |
| Good for newcomers |
| Extra attention needed |
| Further information requested |
| Will not be addressed |
| Already exists |
| Urgent issues |
适用时请使用以下标准标签:
| 标签 | 使用场景 |
|---|---|
| 功能异常 |
| 新功能或优化 |
| 文档更新 |
| 适合新手的任务 |
| 需要额外关注 |
| 需要更多信息 |
| 不会处理 |
| 重复工单 |
| 紧急工单 |
Tips
小贴士
- Always confirm the repository context before creating issues
- Ask for missing critical information rather than guessing
- Link related issues when known:
Related to #123 - For updates, fetch current issue first to preserve unchanged fields
- 创建工单前请确认仓库上下文
- 若缺少关键信息,向用户询问而非猜测
- 已知相关工单时请添加链接:
Related to #123 - 更新工单时,先获取当前工单信息以保留未修改的字段