Duplicate Hunter is a GitHub App for detecting duplicate GitHub issues and pull requests, explaining matching evidence, and helping open-source maintainers review potential duplicates before closing anything.
GitHub App Β· GitHub Marketplace Β· Duplicate Issue Detection Β· Duplicate Pull Request Detection Β· AI-assisted Developer Tool
[!IMPORTANT] Core Principle: Duplicate Hunter must never automatically close an issue or pull request based solely on AI analysis.
Workflow: Detect β Explain β Suggest β Maintainer decides
- Explainable Evidence: Instead of an opaque number like
Similarity: 93%, Duplicate Hunter explains the exact evidence (matching exception names, stack trace frames, reproduction steps, component names, and environment differences). - False-Positive Protection: Prefers "Potentially related" over "This is definitely a duplicate". Never marks issues as duplicate without explicit maintainer confirmation.
- Bot Idempotency: Checks whether Duplicate Hunter already commented, avoids spamming repeated comments, and updates existing reports only when analysis materially changes.
- Provider-Independent AI: Works out of the box with zero external network dependencies using built-in deterministic subword feature hashing, and optionally supports OpenAI (
text-embedding-3-small) or local Ollama instances. - Security-First Architecture: Treats all issue content as untrusted input. Protects against prompt injection attacks, delimiter hijacking, and ReDoS.
- Modern Maintainer Dashboard: Next.js + React + Tailwind CSS dashboard providing overview metrics, recent detections, live maintainer review buttons, interactive test simulator, and one-click GDPR data deletion.
When a new issue is opened, Duplicate Hunter posts a structured, developer-focused comment:
### π΅οΈ Duplicate Hunter
I found **2 potentially related issues**.
#### #1927 β Crash during CSV import
**Confidence: High**
Matching signals:
* β Same CSV import operation
* β Similar crash description
* β Same `NullReferenceException`
* β Similar reproduction steps
* β Same affected component
#### #2144 β Application crashes with large CSV files
**Confidence: Medium**
Matching signals:
* β CSV import
* β Large file handling
* β Application crash
### Difference
The new issue reports Windows 11, while #1927 was reported on Windows 10.
β οΈ **This may be a duplicate. Please review before closing.**
[View #1927](https://github.com/org/repo/issues/1927) [View #2144](https://github.com/org/repo/issues/2144)- Issue β Issue: Finds potentially duplicate existing open issues.
- Issue β PR: Detects whether an existing pull request already addresses the reported issue ("π‘ This issue may already be addressed by PR #782").
- PR β PR: Detects overlapping or duplicate pull requests across contributors.
- Issue β Closed Issue: Identifies solved historical issues and links to the resolving release tag.
duplicate-hunter/
βββ apps/
β βββ web/ # Next.js 14 Maintainer Dashboard, Simulator & REST API
β βββ github-app/ # Standalone GitHub App webhook listener & worker service
β
βββ packages/
β βββ core/ # Domain models, scoring weights, constants & types
β βββ config/ # YAML parser & schema validator for .github/duplicate-hunter.yml
β βββ similarity/ # Signal extractors (errors, stack traces, OS, repro steps) & scoring
β βββ ai/ # Embedding & Analysis providers (Local, OpenAI, Ollama, Sanitizer)
β βββ github/ # Octokit wrapper, HMAC webhook verification, comment formatter & checks
β βββ database/ # Persistent store, PostgreSQL schema, stats, and privacy deletion
β
βββ docs/ # Architecture, security model, privacy policy, and setup guides
βββ tests/ # Comprehensive unit & integration test suites
βββ .github/ # Issue templates, workflows, and default repository config
βββ docker-compose.yml # Multi-container production deployment with pgvector
βββ Dockerfile # Multi-stage production container image
βββ LICENSE # Apache 2.0
βββ README.md
Repositories can customize Duplicate Hunter by committing .github/duplicate-hunter.yml:
enabled: true
issues:
enabled: true
threshold: 0.78 # Minimum score to consider an issue related (0.1 - 1.0)
searchClosedIssues: true # Compare against solved historical issues
maxLookbackIssues: 500 # Number of recent issues to evaluate
pullRequests:
enabled: true
threshold: 0.80 # Minimum score for PR duplicate matching
maxCandidates: 5 # Maximum candidate matches to report
comment:
enabled: true
minConfidence: medium # Options: high | medium | low
header: "### π΅οΈ Duplicate Hunter"
labels:
enabled: true
label: possible-duplicate # Automatically applied label (never definitive 'duplicate')
reviewLabel: duplicate-review
checks:
enabled: true
failureMode: neutral # Options: neutral | failure | success
confidenceWeights:
semantic: 0.35
error: 0.20
component: 0.15
reproduction: 0.10
environment: 0.08
version: 0.05
label: 0.04
referencedCode: 0.03
ai:
provider: local # Options: local | openai | ollama
# model: text-embedding-3-small
retentionDays: 90The web dashboard (apps/web) provides maintainers with:
- Overview Metrics: Issues analyzed, potential duplicates, confirmed duplicates, false positives, issues saved.
- Recent Detections Table: Review candidates, inspect signal checklists and differences, and record decisions:
Confirmed DuplicateRelatedNot RelatedFalse Positive
- Interactive Simulator: Test any two issues or stack traces in real time before deployment.
- Repository Settings Editor: Adjust thresholds, AI providers, and labels with instant preview.
- Privacy & Security Controls: Review data transmission policy and trigger one-click permanent repository data deletion.
- Node.js 20.x or higher
- npm 10.x or higher
npm installnpm testDuplicate Hunter includes a complete test suite covering webhook signature validation, prompt injection defense, signal extraction, similarity fixtures, bot idempotency, and maintainer reviews.
npm run dev:webOpen http://localhost:3000 in your browser.
npm run dev:botThe webhook listener will run at http://localhost:3001/api/webhook.
- Untrusted Input Sanitization: All issue descriptions and comments are sanitized to neutralize prompt injection attacks (
IGNORE PREVIOUS INSTRUCTIONS,[INST],<|system|>). - Cryptographic Signature Verification: Webhook payloads are verified with
crypto.timingSafeEqualand HMAC-SHA256. - Zero Third-Party Leaks by Default: The default
localprovider executes 100% offline with zero external network calls. - Data Deletion Mechanism: Permanent deletion API available at
DELETE /api/repositories/:id/data.
For full details, see docs/security.md and docs/privacy.md.
- v1.0: Issue β Issue duplicate detection with explainable signals
- v1.1: Closed issue historical detection & release tag matching
- v1.2: Issue β Pull Request resolution suggestion
- v1.3: PR β PR overlap detection
- v1.4: GitHub Checks API integration
- v1.5: Maintainer Feedback Review loop & Web Dashboard
- v2.0: Repository-wide duplicate graph & cluster visualizer
- v2.1: Adaptive weight auto-tuning from maintainer feedback
- v2.2: Abstract Syntax Tree (AST) code-aware similarity
- v2.3: Cross-repository duplicate detection for multi-repo orgs
- v3.0: Full repository AI intelligence & automated triage
Licensed under the Apache License, Version 2.0.