Skip to content

Commit d864ead

Browse files
committed
Add Github action to detect potential duplicate issues
Signed-off-by: Fred Bricon <[email protected]>
1 parent 5c0123f commit d864ead

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Potential Duplicate Issues
2+
on:
3+
issues:
4+
types: [opened, edited] #edited means the issue title changed
5+
jobs:
6+
run:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: wow-actions/potential-duplicates@4d4ea0352e0383859279938e255179dd1dbb67b5 #v1.1.0
10+
with:
11+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
# Issue title filter work with anymatch https://www.npmjs.com/package/anymatch.
13+
# Any matched issue will stop detection immediately.
14+
# You can specify multi filters in each line.
15+
filter: ''
16+
# Exclude keywords in title before detecting.
17+
exclude: 'regression'
18+
# Label to set, when potential duplicates are detected.
19+
label: potential-duplicate
20+
# Get issues with state to compare. Supported state: 'all', 'closed', 'open'.
21+
state: all
22+
# If similarity is higher than this threshold([0,1]), issue will be marked as duplicate.
23+
threshold: 0.6
24+
# Reactions to be add to comment when potential duplicates are detected.
25+
# Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes"
26+
reactions: 'confused'
27+
# Comment to post when potential duplicates are detected.
28+
comment: |
29+
We have found issues that are potential duplicates: {{#issues}}
30+
- #{{ number }} ({{ accuracy }}%)
31+
{{/issues}}
32+
33+
If any of the issues listed above are a duplicate, please consider closing this issue & upvoting/commenting the original one.
34+
Alternatively, if neither of the listed issues addresses your feature/bug, keep this issue open.

0 commit comments

Comments
 (0)