mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-10-02 01:34:57 +08:00
Flag unvalidated command sources in scope guard output
Report command-source entries the guard skipped and stop the pass message from claiming every added entry came from a live repo. Remote-Dev: homespace
This commit is contained in:
@@ -69,9 +69,10 @@ function analyze({ changedFiles, before, after, liveRepos }) {
|
||||
problems.push('makes no in-scope change (expected additions to marketplace.json)');
|
||||
}
|
||||
|
||||
const unvalidated = [];
|
||||
for (const name of added) {
|
||||
// Command sources have no repo URL to validate.
|
||||
if (after[name] && after[name].source && after[name].source.source === 'command') continue;
|
||||
// Command sources have no repo URL to validate; report them so a reviewer checks them by hand.
|
||||
if (after[name] && after[name].source && after[name].source.source === 'command') { unvalidated.push(name); continue; }
|
||||
const u = after[name] && after[name].source && after[name].source.url;
|
||||
if (!u) { problems.push(`added "${name}" has no source.url to validate`); continue; }
|
||||
const r = normalizeRepo(u);
|
||||
@@ -81,7 +82,7 @@ function analyze({ changedFiles, before, after, liveRepos }) {
|
||||
}
|
||||
}
|
||||
|
||||
return { ok: problems.length === 0, problems, added, removed, modified, liveRepoCount: liveRepos.size };
|
||||
return { ok: problems.length === 0, problems, added, removed, modified, unvalidated, liveRepoCount: liveRepos.size };
|
||||
}
|
||||
|
||||
async function readPlugins(github, owner, repo, ref) {
|
||||
|
||||
@@ -51,4 +51,8 @@ jobs:
|
||||
);
|
||||
return;
|
||||
}
|
||||
console.log(`Scope guard passed: adds ${result.added.join(', ') || 'none'}, all from repos already live here.`);
|
||||
const unvalidated = result.unvalidated || [];
|
||||
if (unvalidated.length) {
|
||||
core.warning(`Command-source entries are not repo-validated; review manually: ${unvalidated.join(', ')}`);
|
||||
}
|
||||
console.log(`Scope guard passed: adds ${result.added.join(', ') || 'none'}${unvalidated.length ? '' : ', all from repos already live here'}.`);
|
||||
|
||||
Reference in New Issue
Block a user