mcpField
G
github-issue-dedupe

github-issue-dedupe

github.com/warpdotdev开发822142 次安装28 周前更新
代码仓库

关于 github-issue-dedupe

github-issue-dedupe 是用于查找潜在重复 GitHub issue 的技能,可按关键词、错误信息和症状搜索。它会比较候选 issue,仅在置信度高时才在目标 issue 留言。

主要功能

  1. 01按关键词和错误搜索 issue
  2. 02比较症状与根本原因
  3. 03使用 gh issue view 检查候选项
  4. 04仅对高置信度匹配项留言

适用场景

  1. 01检查新提交的 issue 是否重复
  2. 02查找错误信息相同的相关报告
  3. 03避免在相似但不同的缺陷上重复留言

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/warpdotdev/oz-skills --skill github-issue-dedupe

安装后在 Claude Code 中输入/github-issue-dedupe确认已加载。

附带文件README.md

详细介绍

GitHub 重复问题检测

通过多种策略搜索重复的 GitHub 问题。可手动运行,也可通过 GitHub Actions 自动运行。

工作流

1. 收集问题上下文

提取目标问题的关键信息:

  • 问题编号和标题
  • 完整正文内容
  • 错误消息或堆栈跟踪
  • 关键词和技术术语
  • 症状或行为描述
2. 搜索策略

使用 gh 通过多种策略搜索相关问题:

  • 根据标题和正文搜索关键词
  • 搜索相似的错误消息
  • 查找相似的症状
3. 检查候选问题

针对每个可能重复的问题:

  • 使用 gh issue view <number> 查看完整问题
  • 比较:
    • 根本原因(是否是同一个底层问题?)
    • 症状(行为是否相同?)
    • 错误消息(是否完全匹配或非常相似?)
    • 受影响的组件(是否属于同一代码区域?)

高置信度指标:

  • 错误消息完全相同
  • 复现步骤相同
  • 根本原因相同,但描述不同
  • 一个问题引用了另一个问题

低置信度(不是重复问题):

  • 症状相似,但原因不同
  • 相关但彼此独立的缺陷
  • 属于同一组件,但行为不同
4. 报告结果

如果发现重复问题:

在目标问题上发表评论:

gh issue comment <number> --body "This is potentially a duplicate of #123 and #456."

格式规则:

  • 单个重复问题:"This is potentially a duplicate of #123."
  • 两个重复问题:"This is potentially a duplicate of #123 and #456."
  • 三个及以上重复问题:"This is potentially a duplicate of #123, #456, and #789."

仅在置信度高时评论(确信度达到 90% 以上)。不确定时,请勿采取任何操作。

示例

示例 1:明确重复

目标问题 #150:

Title: "Dropdown menu stays open on mobile Safari"
Body: Clicking menu items doesn't close dropdown on iOS

搜索过程:

gh issue list --search "dropdown mobile safari"
gh issue list --search "menu doesn't close"
gh issue view 87  # Found similar issue

问题 #87:

Title: "Mobile menu not closing after selection"
Body: On iOS Safari, menu stays open after clicking items

**判定:**重复

  • 症状相同(菜单保持打开)
  • 平台相同(iOS Safari)
  • 根本原因相同
示例 2:相似但不重复

目标问题 #200:

Title: "Form validation error on submit"
Error: "Cannot read property 'value' of null"

搜索过程:

gh issue list --search "form validation"
gh issue list --search "Cannot read property value null"
gh issue view 175

问题 #175:

Title: "Form submission fails"
Error: "Cannot read property 'email' of undefined"

**判定:**不重复

  • 错误消息不同
  • 空引用不同(value 与 email)
  • 属于相关区域,但缺陷不同
示例 3:多个重复问题

目标问题 #300:

Title: "Build fails with 'module not found' error"
Error: Error: Cannot find module './config'

搜索结果:

  • 问题 #250:错误相同,模块相同
  • 问题 #280:错误相同,模块相同
  • 问题 #290:模块错误不同(不重复)

操作:

gh issue comment 300 --body "This is potentially a duplicate of #250 and #280."

评论

支持 Markdown