skilld 0.9.0 → 0.9.2

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.
@@ -76,16 +76,20 @@ const DOCS_LABELS = new Set([
76
76
  "doc",
77
77
  "typo"
78
78
  ]);
79
+ function labelMatchesAny(label, keywords) {
80
+ for (const keyword of keywords) if (label === keyword || label.includes(keyword)) return true;
81
+ return false;
82
+ }
79
83
  function classifyIssue(labels) {
80
84
  const lower = labels.map((l) => l.toLowerCase());
81
- if (lower.some((l) => BUG_LABELS.has(l))) return "bug";
82
- if (lower.some((l) => QUESTION_LABELS.has(l))) return "question";
83
- if (lower.some((l) => DOCS_LABELS.has(l))) return "docs";
84
- if (lower.some((l) => FEATURE_LABELS.has(l))) return "feature";
85
+ if (lower.some((l) => labelMatchesAny(l, BUG_LABELS))) return "bug";
86
+ if (lower.some((l) => labelMatchesAny(l, QUESTION_LABELS))) return "question";
87
+ if (lower.some((l) => labelMatchesAny(l, DOCS_LABELS))) return "docs";
88
+ if (lower.some((l) => labelMatchesAny(l, FEATURE_LABELS))) return "feature";
85
89
  return "other";
86
90
  }
87
91
  function isNoiseIssue(issue) {
88
- if (issue.labels.map((l) => l.toLowerCase()).some((l) => NOISE_LABELS.has(l))) return true;
92
+ if (issue.labels.map((l) => l.toLowerCase()).some((l) => labelMatchesAny(l, NOISE_LABELS))) return true;
89
93
  if (issue.title.startsWith("☂️") || issue.title.startsWith("[META]") || issue.title.startsWith("[Tracking]")) return true;
90
94
  return false;
91
95
  }
@@ -99,7 +103,7 @@ function isNonTechnical(issue) {
99
103
  return false;
100
104
  }
101
105
  function freshnessScore(reactions, createdAt) {
102
- return reactions * (1 / (1 + (Date.now() - new Date(createdAt).getTime()) / (365.25 * 24 * 60 * 60 * 1e3) * .3));
106
+ return reactions * (1 / (1 + (Date.now() - new Date(createdAt).getTime()) / (365.25 * 24 * 60 * 60 * 1e3) * .6));
103
107
  }
104
108
  function applyTypeQuotas(issues, limit) {
105
109
  const byType = /* @__PURE__ */ new Map();