Skip to content

Commit

Permalink
feat(workflows): 👷 detect potential duplicates in issues (#2787)
Browse files Browse the repository at this point in the history
Co-authored-by: Okinea Dev <[email protected]>
  • Loading branch information
PKief and okineadev committed Jan 6, 2025
1 parent 166ffca commit e5dddb5
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/potential-duplicates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "🧐 Potential Duplicates"
on:
issues:
types: [opened, edited] # edited means the issue title changed
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/potential-duplicates@4d4ea0352e0383859279938e255179dd1dbb67b5 # v1.1.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Issue title filter work with anymatch https://www.npmjs.com/package/anymatch.
# Any matched issue will stop detection immediately.
# You can specify multi filters in each line.
filter: ''
# Exclude keywords in title before detecting.
exclude: ''
# Label to set, when potential duplicates are detected.
label: "🧐 potential-duplicate"
# Get issues with state to compare. Supported state: 'all', 'closed', 'open'.
state: all
# If similarity is higher than this threshold([0,1]), issue will be marked as duplicate.
threshold: 0.6
# Reactions to be add to comment when potential duplicates are detected.
# Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes"
reactions: 'eyes'
# Comment to post when potential duplicates are detected.
comment: |
We have found issues that are potential duplicates: {{#issues}}
- #{{ number }} ({{ accuracy }}%)
{{/issues}}
If any of the issues listed above is a duplicate, please consider closing this issue & upvoting/commenting the original one.
Alternatively, if neither of the listed issues addresses your feature/bug, keep this issue open.

0 comments on commit e5dddb5

Please sign in to comment.