@sweny-ai/core 0.1.47 → 0.1.48
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.
|
@@ -26,9 +26,10 @@ function isHistorical(filePath) {
|
|
|
26
26
|
* Use git grep for fast, indexed search across the repo.
|
|
27
27
|
* Returns array of "file:line:content" strings.
|
|
28
28
|
*/
|
|
29
|
-
function gitGrep(pattern,
|
|
29
|
+
function gitGrep(pattern, paths = ["."]) {
|
|
30
30
|
try {
|
|
31
|
-
const
|
|
31
|
+
const pathArgs = paths.map((p) => `"${p}"`).join(" ");
|
|
32
|
+
const result = execSync(`git grep -n "${pattern}" -- ${pathArgs}`, {
|
|
32
33
|
cwd: ROOT,
|
|
33
34
|
encoding: "utf-8",
|
|
34
35
|
maxBuffer: 10 * 1024 * 1024,
|
|
@@ -284,3 +285,28 @@ describe("three-action architecture", () => {
|
|
|
284
285
|
expect(readme).toContain(`swenyai/sweny@${CURRENT_ACTION_VERSION}`);
|
|
285
286
|
});
|
|
286
287
|
});
|
|
288
|
+
// ─── 7. Input naming consistency ────────────────────────────────────
|
|
289
|
+
describe("input naming consistency", () => {
|
|
290
|
+
const DOCS_DIR = resolve(ROOT, "packages/web/src/content/docs");
|
|
291
|
+
it("docs use issue-override, not linear-issue", () => {
|
|
292
|
+
const matches = gitGrep("linear-issue", ["packages/web/src/content/docs/"]);
|
|
293
|
+
if (matches.length > 0) {
|
|
294
|
+
expect.fail(`Found "linear-issue" in docs — the triage action input is "issue-override":\n` +
|
|
295
|
+
matches.map((m) => ` ${m.split(":").slice(0, 2).join(":")}`).join("\n"));
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
it("docs use mcp-servers-json, not bare mcp-servers as an input name", () => {
|
|
299
|
+
// Match `mcp-servers:` or `mcp-servers |` in YAML (the input name), but NOT
|
|
300
|
+
// `mcp-servers-json` or prose text mentioning "MCP servers" as a concept
|
|
301
|
+
const matches = gitGrep("mcp-servers[^-]", ["packages/web/src/content/docs/"]);
|
|
302
|
+
const inputRefs = matches.filter((m) => {
|
|
303
|
+
const content = m.split(":").slice(2).join(":");
|
|
304
|
+
// Only flag YAML input usage, not prose text
|
|
305
|
+
return /^\s*(mcp-servers:|mcp-servers\s*\|)/.test(content);
|
|
306
|
+
});
|
|
307
|
+
if (inputRefs.length > 0) {
|
|
308
|
+
expect.fail(`Found bare "mcp-servers" as an input — the triage action input is "mcp-servers-json":\n` +
|
|
309
|
+
inputRefs.map((m) => ` ${m.split(":").slice(0, 2).join(":")}`).join("\n"));
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
});
|