wow-actions / potential-duplicates Goto Github PK
View Code? Open in Web Editor NEW🔎 Search for potential issue duplicates using Damerau–Levenshtein algorithm
License: MIT License
🔎 Search for potential issue duplicates using Damerau–Levenshtein algorithm
License: MIT License
What information is used to judge duplicate issues? Only the title?
When I add a regex special character to an exclusion word I don't want to deal with the problem of regex-escaping them because is really confusing to add escaping characters to YAML. Additionally, the documentation of the action is not referrencing that exclusion words are regexes, it refers to them as "keywords".
When I add a regex special character to an exclusion, the action raises a Syntax error. I can reproduce it locally with, for example:
> 'icon\nrequest\n[\n]'.split(/[\s\n]+/).map((keyword) => keyword.trim()).filter((keyword) => keyword.length > 0).reduce((memo, keyword) => memo.replace(new RegExp(keyword, 'igm'), ''), '[icon request] hello world')
Uncaught SyntaxError: Invalid regular expression: /[/: Unterminated character class
Regex-escaping exclude
keywords with a function like this:
function escapeRegExp(text) {
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
}
Other solution would be to define exclude
keywords as regexes in the documentation and provide an example of regex-escaping them.
Thanks for this action!
I would like to use something similar for https://github.com/simple-icons/simple-icons
It would be really beneficial if we could filter some words of the algo. For example, we have a lot of request that looks like Request: brandname icon
. There would be a lot of false positive if we use your action as-is. But if we could exclude specific words like Request
and icon
, it could probably be able to catch a good amount of duplicate.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.