Fix external plugin gate manifest paths and diagnostics (#2261)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Aaron Powell
2026-07-10 14:31:25 +10:00
committed by GitHub
parent e03696a5bf
commit bb4766e226
3 changed files with 37 additions and 2 deletions
@@ -200,6 +200,18 @@ jobs:
: qualityResult.overall_status === 'pass' || !shouldRun : qualityResult.overall_status === 'pass' || !shouldRun
? '## ✅ External plugin PR checks passed' ? '## ✅ External plugin PR checks passed'
: '## ⚠️ External plugin PR checks need maintainer follow-up'; : '## ⚠️ External plugin PR checks need maintainer follow-up';
const formatGateOutput = (pluginName, gateName, gateStatus, rawOutput) => {
const output = String(rawOutput || '').trim() || '_No output captured._';
return [
'<details>',
`<summary>${pluginName} — ${gateName} (${gateStatus || 'not_run'})</summary>`,
'',
'```text',
output,
'```',
'</details>',
].join('\n');
};
const rows = checkedPlugins.length > 0 const rows = checkedPlugins.length > 0
? checkedPlugins.map((entry) => { ? checkedPlugins.map((entry) => {
@@ -211,6 +223,21 @@ jobs:
return `| ${name} | ${quality.vally_lint_status || 'not_run'} | ${quality.smoke_status || 'not_run'} | ${quality.overall_status || 'not_run'} | ${sourceCell} |`; return `| ${name} | ${quality.vally_lint_status || 'not_run'} | ${quality.smoke_status || 'not_run'} | ${quality.overall_status || 'not_run'} | ${sourceCell} |`;
}) })
: ['| _none_ | not_run | not_run | not_run | _n/a_ |']; : ['| _none_ | not_run | not_run | not_run | _n/a_ |'];
const failureDetails = checkedPlugins.flatMap((entry) => {
const name = String(entry?.name || 'unknown');
const quality = entry?.quality || {};
const shouldShowVally = quality.vally_lint_status === 'fail' || quality.vally_lint_status === 'infra_error' || String(quality.vally_lint_output || '').trim().length > 0;
const shouldShowSmoke = quality.smoke_status === 'fail' || quality.smoke_status === 'infra_error' || String(quality.smoke_output || '').trim().length > 0;
const details = [];
if (shouldShowVally) {
details.push(formatGateOutput(name, 'vally lint', quality.vally_lint_status, quality.vally_lint_output));
}
if (shouldShowSmoke) {
details.push(formatGateOutput(name, 'install smoke test', quality.smoke_status, quality.smoke_output));
}
return details;
});
const body = [ const body = [
marker, marker,
@@ -225,6 +252,14 @@ jobs:
'|---|---|---|---|---|', '|---|---|---|---|---|',
...rows, ...rows,
'', '',
...(failureDetails.length > 0
? [
'### Gate output details',
'',
...failureDetails,
'',
]
: []),
String(qualityResult.summary || '').trim() || '_No summary provided._', String(qualityResult.summary || '').trim() || '_No summary provided._',
].join('\n'); ].join('\n');
+1 -1
View File
@@ -140,7 +140,7 @@ function cloneSubmissionRepository(workDir, plugin) {
// NOTE: Keep in sync with EXTERNAL_PLUGIN_ROOT_MANIFEST_PATHS in external-plugin-validation.mjs // NOTE: Keep in sync with EXTERNAL_PLUGIN_ROOT_MANIFEST_PATHS in external-plugin-validation.mjs
const PLUGIN_JSON_CANDIDATES = [ const PLUGIN_JSON_CANDIDATES = [
[".github", "plugin", "plugin.json"], [".github", "plugin", "plugin.json"],
[".plugins", "plugin.json"], [".plugin", "plugin.json"],
["plugin.json"], ["plugin.json"],
]; ];
+1 -1
View File
@@ -27,7 +27,7 @@ export const EXTERNAL_PLUGIN_POLICIES = Object.freeze({
const EXTERNAL_PLUGIN_ROOT_MANIFEST_PATHS = Object.freeze([ const EXTERNAL_PLUGIN_ROOT_MANIFEST_PATHS = Object.freeze([
"plugin.json", "plugin.json",
".github/plugin/plugin.json", ".github/plugin/plugin.json",
".plugins/plugin.json", ".plugin/plugin.json",
]); ]);
function resolvePolicy(policy) { function resolvePolicy(policy) {