mirror of
https://github.com/iv-org/close-potential-duplicates.git
synced 2024-11-23 05:49:44 +00:00
🔎 Search for potential issue duplicates using Damerau–Levenshtein algorithm and close them
4b678995fb
## [1.0.10](https://github.com/wow-actions/potential-duplicates/compare/v1.0.9...v1.0.10) (2021-09-21) |
||
---|---|---|
.github/workflows | ||
.husky | ||
src | ||
.editorconfig | ||
.eslintrc | ||
.gitignore | ||
.prettierignore | ||
.prettierrc | ||
action.yml | ||
CHANGELOG.md | ||
LICENSE | ||
package.json | ||
README.md | ||
tsconfig.json | ||
yarn.lock |
Potential Duplicates
Search for potential issue duplicates using Damerau–Levenshtein algorithm
Usage
Create .github/workflows/potential-duplicates.yml
in the default branch:
name: Potential Duplicates
on:
issues:
types: [opened, edited]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/potential-duplicates@v1
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, confused'
# Comment to post when potential duplicates are detected.
comment: >
Potential duplicates: {{#issues}}
- [#{{ number }}] {{ title }} ({{ accuracy }}%)
{{/issues}}
Inputs
Various inputs are defined to let you configure the action:
Note: Workflow command and parameter names are not case-sensitive.
Name | Description | Default |
---|---|---|
GITHUB_TOKEN |
The GitHub token for authentication | N/A |
filter |
Issue title filter work with anymatch Any matched issue will stop detection immediately You can specify multi filters in each line |
'' |
exclude |
Exclude keywords in title before detecting | '' |
label |
Label to set, when potential duplicates are detected | 'potential-duplicate' |
state |
Get issues with state to compare. Supported state: 'all' 'closed' 'open' |
'all' |
threshold |
If similarity is higher than this threshold([0,1] ), issue will be marked as duplicate |
0.6 |
reactions |
Reactions to be add to comment when potential duplicates are detected Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes" |
|
comment |
Comment to post when potential duplicates are detected | 👇 |
Available reactions:
content | emoji |
---|---|
+1 |
👍 |
-1 |
👎 |
laugh |
😄 |
confused |
😕 |
heart |
❤️ |
hooray |
🎉 |
rocket |
🚀 |
eyes |
👀 |
Default comment:
Potential duplicates: {{#issues}}
- [#{{ number }}] {{ title }} ({{ accuracy }}%)
{{/issues}}
License
The scripts and documentation in this project are released under the MIT License