关于 close-issue-flow
close-issue-flow 是用于手动关闭 Gitee issue 的技能,会先核实问题的解决情况。它检查关联拉取请求的状态、发布相应评论,并更新 issue 状态。
主要功能
- 01获取 issue 详情和评论
- 02检查关联拉取请求是否已合并
- 03发布解决说明评论
- 04将 issue 状态更新为已关闭
- 05汇报关闭结果
适用场景
- 01关联 PR 合并后关闭 issue
- 02记录未通过 PR 完成的解决方案
- 03关闭无法复现或不予采纳的请求
MCP 相关
它调用 Gitee MCP Server 工具来获取 issue 详情、列出拉取请求、发布评论和更新 issue 状态。README 建议在已安装 mcporter 时通过它调用这些工具。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ oschina/ gitee-agent-skills --skill close-issue-flow安装后在 Claude Code 中输入/close-issue-flow确认已加载。
详细介绍
注意:如果本地已安装
mcporter,应使用mcporter调用 MCP 工具,而不是直接调用 MCP 工具。mcporterCLI 提供了更便捷的界面和更好的错误处理。
通过 Gitee MCP 关闭 Issue 的流程
执行完整的 Issue 关闭工作流:确认修复已合并 → 发布关闭评论 → 更新 Issue 状态。
前提条件
- 已配置 Gitee MCP 服务(工具:
get_repo_issue_detail、list_repo_pulls、create_comment(resource_type: issue)、update_issue) - 用户必须提供:仓库所有者、仓库名称、Issue 编号
- 通常在相关 PR 已合并或问题已解决后运行
步骤
步骤 1:获取 Issue 详情
使用 get_repo_issue_detail 获取 Issue 信息:
- 标题、描述、标签
- 当前状态(检查是否已关闭)
- 现有评论(了解问题是如何解决的)
如果 Issue 已关闭,请通知用户并停止。
步骤 2:确认关联 PR 的状态
使用 list_repo_pulls 查询仓库的 PR,并筛选:
- 状态:
merged - 描述中包含
closes #[issue number]或fixes #[issue number]
根据查询结果:
- 如果找到已合并的关联 PR → 确认修复已生效
- 如果相关 PR 仍处于打开状态 → 通知用户 PR 尚未合并
- 如果不存在关联 PR → 询问用户 Issue 是如何解决的
步骤 3:发布关闭评论
使用 create_comment(resource_type: issue)发布关闭说明。选择合适的模板:
关联 PR 已合并时:
This issue has been fixed and merged via PR #[number].
**Fix summary**: [brief description of the fix]
Thanks for the report! If the problem persists, feel free to reopen this issue or submit a new one.
直接解决时(无 PR):
This issue has been resolved.
**Solution**: [description of how it was resolved]
If the problem persists, feel free to reopen this issue or submit a new one.
无法复现或请求被拒绝时:
[Explanation, e.g., "Unable to reproduce this issue" or "After discussion, we've decided not to implement this feature at this time."]
If you have new information, feel free to reopen the issue with additional details.
步骤 4:关闭 Issue
使用 update_issue 更新 Issue 状态:
state:closed
可选操作:
- 更新标签(例如,添加
fixed或resolved) - 分配到里程碑(添加到已完成的里程碑)
步骤 5:输出摘要
## Issue Closed
- Issue: #[number] [title]
- Reason: [Fixed / Cannot reproduce / Declined]
- Linked PR: #[number] (if any)
- Closing comment posted ✅
- Issue status updated to closed ✅
说明
- 关闭前务必确认问题确实已解决,以免过早关闭
- 关闭用户报告的错误时,请感谢用户提交报告
- 拒绝功能请求时,请说明原因并礼貌地关闭
- 在 PR 描述中使用
closes #N会在合并时自动关闭 Issue — 本技能适用于需要手动关闭或添加说明评论的情况
评论
支持 Markdown