mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
chore(lint): clear sort mutation, spread fallback, and error-cause findings
toSorted/flat in the labeler coverage test, drop no-op empty-object spread fallbacks in the telegram command-menu e2e config, and attach the caught cause when rewrapping the trusted-workflow parse error.
This commit is contained in:
@@ -218,14 +218,14 @@ test("registers pressure-prioritized Telegram menus through a real Gateway", asy
|
||||
{ agentId: "qa", match: { channel: "telegram", accountId: "skill" } },
|
||||
];
|
||||
cfg.plugins = {
|
||||
...(cfg.plugins ?? {}),
|
||||
...cfg.plugins,
|
||||
allow: [...new Set([...(cfg.plugins?.allow ?? []), LOCALIZED_PLUGIN_ID])],
|
||||
entries: {
|
||||
...(cfg.plugins?.entries ?? {}),
|
||||
...cfg.plugins?.entries,
|
||||
[LOCALIZED_PLUGIN_ID]: { enabled: true },
|
||||
},
|
||||
load: {
|
||||
...(cfg.plugins?.load ?? {}),
|
||||
...cfg.plugins?.load,
|
||||
paths: [...new Set([...(cfg.plugins?.load?.paths ?? []), localizedPluginDir])],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -17,11 +17,11 @@ const labelerPath = path.join(repoRoot, ".github/labeler.yml");
|
||||
const extensionDirectories = readdirSync(extensionsRoot, { withFileTypes: true })
|
||||
.filter((entry) => entry.isDirectory())
|
||||
.map((entry) => entry.name)
|
||||
.sort();
|
||||
.toSorted();
|
||||
const extensionDirectorySet = new Set(extensionDirectories);
|
||||
const labeler = parse(readFileSync(labelerPath, "utf8")) as Record<string, LabelerRule>;
|
||||
const extensionGlobDirectories = Object.values(labeler)
|
||||
.flatMap((rules) => rules)
|
||||
.flat()
|
||||
.flatMap((rule) => rule["changed-files"] ?? [])
|
||||
.flatMap((changedFiles) => changedFiles["any-glob-to-any-file"] ?? [])
|
||||
.flatMap((glob) => glob.match(/^extensions\/([^/]+)\//)?.[1] ?? []);
|
||||
|
||||
Reference in New Issue
Block a user