🔎 Search for potential issue duplicates using Damerau–Levenshtein algorithm and close them
Go to file
2020-09-27 21:59:20 +08:00
.github/workflows perf: ️ init 2020-09-27 21:29:47 +08:00
src refactor: ♻️ format of threshold 2020-09-27 21:59:20 +08:00
.editorconfig perf: ️ init 2020-09-27 21:29:47 +08:00
.gitignore perf: ️ init 2020-09-27 21:29:47 +08:00
.prettierignore perf: ️ init 2020-09-27 21:29:47 +08:00
.prettierrc perf: ️ init 2020-09-27 21:29:47 +08:00
action.yml fix: 🐛 typos 2020-09-27 21:38:35 +08:00
LICENSE Initial commit 2020-09-27 14:16:24 +08:00
package.json perf: ️ init 2020-09-27 21:29:47 +08:00
README.md refactor: ♻️ format of threshold 2020-09-27 21:59:20 +08:00
tsconfig.json perf: ️ init 2020-09-27 21:29:47 +08:00
tslint.json perf: ️ init 2020-09-27 21:29:47 +08:00
yarn.lock perf: ️ init 2020-09-27 21:29:47 +08:00

Potential Duplicates

A Github Action to search for potential issue duplicates using DamerauLevenshtein algorithm.

Usage

Create .github/workflows/potential-duplicates.yml in the default branch:

name: Potential Duplicates
on:
  issues:
    types: [opened, edited]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: bubkoo/label-commands@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          # 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
          # Comment to post when potential duplicates are detected.
          comment: >
            Potential duplicates: {{#issues}}
              - [#{{ number }}] {{ title }} ({{ accuracy }}%)
            {{/issues}}            

License

The scripts and documentation in this project are released under the MIT License