mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
## Summary Implements automated detection of potential duplicate issues using GitHub Actions. ## Implementation Details - Uses `wow-actions/potential-duplicates@v1` action - Triggers on issue `opened` and `edited` events - Configured with **90% similarity threshold** to minimize false positives - Automatically adds `potential-duplicate` label and comment with links to similar issues ## Rationale for 90% Threshold Based on manual testing with the `gh_tool` CLI: - 85% threshold produced too many false positives from template-based matches - True duplicates typically have 90%+ similarity - Uses Damerau-Levenshtein distance algorithm (same as manual tool) ## Testing - ✅ YAML syntax validated - ✅ Pre-commit hooks passed (lint + ts-check) - ✅ Created `potential-duplicate` label in repository - Manual testing of similar configuration showed good results at 90% threshold ## Dependencies - Depends on #8166 (add-gh-tools-cli branch) being merged first - This PR adds the automation layer on top of the manual tooling 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
# This workflow automatically detects potential duplicate issues
|
|
# using text similarity analysis with Damerau-Levenshtein distance.
|
|
#
|
|
# For more information, see: https://github.com/wow-actions/potential-duplicates
|
|
|
|
name: Duplicate Issue Detection
|
|
on:
|
|
issues:
|
|
types: [opened, edited]
|
|
|
|
jobs:
|
|
detect-duplicates:
|
|
runs-on: ubuntu-latest
|
|
# Only run on issues, not pull requests
|
|
if: ${{ !github.event.issue.pull_request }}
|
|
steps:
|
|
- uses: wow-actions/potential-duplicates@v1
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
# Use 90% similarity threshold to reduce false positives from template matches
|
|
# Testing showed that 85% threshold produced too many template-based matches
|
|
# True duplicates typically have 90%+ similarity
|
|
threshold: 0.90
|
|
# Comment on the issue if duplicates are found
|
|
label: potential-duplicate
|
|
# Custom comment to link to potentially duplicate issues
|
|
comment: |
|
|
**Potential duplicate detected**
|
|
|
|
This issue appears to be similar to existing issues. Please review them before continuing:
|
|
|
|
{{#issues}}
|
|
- [#{{number}}]({{html_url}}) ({{accuracy}}% similar)
|
|
{{/issues}}
|
|
|
|
If this is not a duplicate, please clarify how it differs from the above issues.
|