github-issue-dedupe
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub Duplicate Issue Detection
GitHub重复Issue检测
Find duplicate GitHub issues using multi-strategy search. Can be run manually or automated via GitHub Actions.
使用多策略搜索查找重复的GitHub Issues。可手动运行,也可通过GitHub Actions实现自动化。
Workflow
工作流程
1. Gather Issue Context
1. 收集Issue上下文
Extract key information from the target issue:
- Issue number and title
- Full body content
- Error messages or stack traces
- Keywords and technical terms
- Symptoms or behavior descriptions
从目标Issue中提取关键信息:
- Issue编号和标题
- 完整正文内容
- 错误信息或堆栈跟踪
- 关键词和技术术语
- 症状或行为描述
2. Search Strategy
2. 搜索策略
Use to search for related issues using multiple strategies:
gh- Keyword search from title and body
- Search for similar error messages
- Look for similar symptoms
使用工具通过多种策略搜索相关Issue:
gh- 基于标题和正文的关键词搜索
- 搜索相似的错误信息
- 查找相似的症状
3. Candidate Inspection
3. 候选问题检查
For each potential duplicate:
- View full issue with
gh issue view <number> - Compare:
- Root cause (same underlying problem?)
- Symptoms (identical behavior?)
- Error messages (exact match or very similar?)
- Affected components (same area of code?)
High confidence indicators:
- Identical error messages
- Same reproduction steps
- Same root cause with different descriptions
- One issue references the other
Low confidence (not duplicates):
- Similar symptoms but different causes
- Related but independent bugs
- Same component but different behaviors
针对每个潜在的重复Issue:
- 使用查看完整Issue
gh issue view <number> - 对比以下内容:
- 根本原因(是否为同一底层问题?)
- 症状(行为是否完全一致?)
- 错误信息(是否完全匹配或高度相似?)
- 受影响组件(是否为同一代码区域?)
高置信度重复指标:
- 完全相同的错误信息
- 相同的复现步骤
- 根本原因相同但描述不同
- 其中一个Issue引用了另一个
低置信度(非重复):
- 症状相似但原因不同
- 相关但独立的Bug
- 同一组件但行为不同
4. Report Findings
4. 报告结果
If duplicates found:
Post comment on target issue:
bash
gh issue comment <number> --body "This is potentially a duplicate of #123 and #456."Format rules:
- Single duplicate: "This is potentially a duplicate of #123."
- Two duplicates: "This is potentially a duplicate of #123 and #456."
- Three+ duplicates: "This is potentially a duplicate of #123, #456, and #789."
Only comment if high confidence (90%+ certain). When uncertain, do nothing.
如果找到重复Issue:
在目标Issue下发布评论:
bash
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%以上确定)时发布评论。不确定时,不执行任何操作。
Examples
示例
Example 1: Clear Duplicate
示例1:明确的重复
Target Issue #150:
Title: "Dropdown menu stays open on mobile Safari"
Body: Clicking menu items doesn't close dropdown on iOSSearch process:
bash
gh issue list --search "dropdown mobile safari"
gh issue list --search "menu doesn't close"
gh issue view 87 # Found similar issueIssue #87:
Title: "Mobile menu not closing after selection"
Body: On iOS Safari, menu stays open after clicking itemsDetermination: Duplicate
- Same symptom (menu stays open)
- Same platform (iOS Safari)
- Same root cause
目标Issue #150:
Title: "Dropdown menu stays open on mobile Safari"
Body: Clicking menu items doesn't close dropdown on iOS搜索过程:
bash
gh issue list --search "dropdown mobile safari"
gh issue list --search "menu doesn't close"
gh issue view 87 # Found similar issueIssue #87:
Title: "Mobile menu not closing after selection"
Body: On iOS Safari, menu stays open after clicking items判定:重复
- 相同症状(菜单保持打开状态)
- 相同平台(iOS Safari)
- 相同根本原因
Example 2: Similar But Not Duplicate
示例2:相似但非重复
Target Issue #200:
Title: "Form validation error on submit"
Error: "Cannot read property 'value' of null"Search process:
bash
gh issue list --search "form validation"
gh issue list --search "Cannot read property value null"
gh issue view 175Issue #175:
Title: "Form submission fails"
Error: "Cannot read property 'email' of undefined"Determination: Not duplicate
- Different error messages
- Different null references (value vs email)
- Related area but different bugs
目标Issue #200:
Title: "Form validation error on submit"
Error: "Cannot read property 'value' of null"搜索过程:
bash
gh issue list --search "form validation"
gh issue list --search "Cannot read property value null"
gh issue view 175Issue #175:
Title: "Form submission fails"
Error: "Cannot read property 'email' of undefined"判定:非重复
- 不同的错误信息
- 不同的空引用(value vs email)
- 相关领域但为不同Bug
Example 3: Multiple Duplicates
示例3:多个重复
Target Issue #300:
Title: "Build fails with 'module not found' error"
Error: Error: Cannot find module './config'Search results:
- Issue #250: Same error, same module
- Issue #280: Same error, same module
- Issue #290: Different module error (not duplicate)
Action:
bash
gh issue comment 300 --body "This is potentially a duplicate of #250 and #280."目标Issue #300:
Title: "Build fails with 'module not found' error"
Error: Error: Cannot find module './config'搜索结果:
- Issue #250:相同错误,相同模块
- Issue #280:相同错误,相同模块
- Issue #290:不同模块错误(非重复)
操作:
bash
gh issue comment 300 --body "This is potentially a duplicate of #250 and #280."