2020-12-07 10:07:22 +08:00
2020-12-07 10:06:37 +08:00
2020-12-07 10:07:22 +08:00
2020-09-27 21:29:47 +08:00
2020-09-27 21:29:47 +08:00
2020-09-27 21:29:47 +08:00
2020-09-27 21:29:47 +08:00
2020-12-04 10:38:14 +08:00
2020-09-27 14:16:24 +08:00
2020-12-07 10:07:22 +08:00
2020-12-07 10:07:22 +08:00
2020-09-27 21:29:47 +08:00
2020-09-27 21:29:47 +08:00
2020-12-04 10:38:14 +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:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: bubkoo/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: ''
          # 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}}

License

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

Description
🔎 Search for potential issue duplicates using Damerau–Levenshtein algorithm and close them
Readme MIT 278 KiB
Languages
TypeScript 97.5%
Shell 2.5%