Skip to content

A configurable GitHub App which checks for potential issue duplicates using Damerau–Levenshtein distance algorithm.

License

Notifications You must be signed in to change notification settings

lekhmanrus/potential-duplicates-bot

 
 

Repository files navigation

potential-duplicates-bot

A configurable GitHub Probot App which checks for potential issue duplicates using Damerau–Levenshtein distance algorithm to compare issues' titles.

The Damerau–Levenshtein distance between two words is the minimum number of operations (consisting of insertions, deletions or substitutions of a single character, or transposition of two adjacent characters) required to change one word into the other. It also detects predefined synonyms for even better results.

The app has been built for an integration with Git Extensions and NBug error report submissions, but with few tweaks can be turned into a general purpose duplicate checker bot.

Demo

Usage

  • You can deploy our Github App manually. For example to Glitch (guide from Andrew Lock)
  • Then, you can create a custom configuration file at .github/potential-duplicates.yml. If this file doesn't exists, default settings will be used:
# Label name and color to set, when potential duplicates are detected
issueLabel: potential-duplicate
labelColor: cfd3d7

# If similarity is higher than this threshold, issue will be marked as duplicate
threshold: 0.60

# Comment to post when potential duplicates are detected
referenceComment: >
  Potential duplicates:
  {{#issues}}
    - {{ shield }} 
  {{/issues}}

Deploying

If you would like to run your own instance of this app, see the docs for deployment. This app requires both Issues – Read & Write and Single File – Read (.github/potential-duplicates.yml) permissions & events.

Setup

# Install dependencies
npm install

# Run the bot
npm run dev

Contributing

If you have suggestions for how potential-duplicates-bot could be improved, or want to report a bug, open an issue! We'd love all and any contributions.

For more, check out the Contributing Guide.

License

ISC © 2019 Igor Velikorossov (https://github.com/RussKie/potential-duplicates-bot)

Credits

The original implementation has been copied from Bartosz Łaniewski

About

A configurable GitHub App which checks for potential issue duplicates using Damerau–Levenshtein distance algorithm.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.3%
  • Shell 1.7%