claude-issue-solver 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/helpers.js +8 -3
- package/package.json +1 -1
package/dist/utils/helpers.js
CHANGED
|
@@ -43,12 +43,17 @@ const fs = __importStar(require("fs"));
|
|
|
43
43
|
const path = __importStar(require("path"));
|
|
44
44
|
const os = __importStar(require("os"));
|
|
45
45
|
function slugify(text) {
|
|
46
|
-
|
|
46
|
+
// Remove common prefixes in brackets like [FAQ], [Bug], etc.
|
|
47
|
+
const withoutBrackets = text.replace(/^\[.*?\]\s*/, '');
|
|
48
|
+
const slug = withoutBrackets
|
|
47
49
|
.toLowerCase()
|
|
48
50
|
.replace(/[^a-z0-9]/g, '-')
|
|
49
51
|
.replace(/-+/g, '-')
|
|
50
|
-
.replace(/^-|-$/g, '')
|
|
51
|
-
|
|
52
|
+
.replace(/^-|-$/g, '');
|
|
53
|
+
// Remove duplicate consecutive words (e.g., "faq-faq" -> "faq")
|
|
54
|
+
const words = slug.split('-');
|
|
55
|
+
const deduped = words.filter((word, i) => word !== words[i - 1]);
|
|
56
|
+
return deduped.join('-').slice(0, 30);
|
|
52
57
|
}
|
|
53
58
|
function checkRequirements() {
|
|
54
59
|
const missing = [];
|