Skip to content

Commit bb4766e

Browse files
aaronpowellCopilot
andauthored
Fix external plugin gate manifest paths and diagnostics (#2261)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent e03696a commit bb4766e

3 files changed

Lines changed: 37 additions & 2 deletions

File tree

.github/workflows/external-plugin-pr-quality-gates.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,18 @@ jobs:
200200
: qualityResult.overall_status === 'pass' || !shouldRun
201201
? '## ✅ External plugin PR checks passed'
202202
: '## ⚠️ External plugin PR checks need maintainer follow-up';
203+
const formatGateOutput = (pluginName, gateName, gateStatus, rawOutput) => {
204+
const output = String(rawOutput || '').trim() || '_No output captured._';
205+
return [
206+
'<details>',
207+
`<summary>${pluginName} — ${gateName} (${gateStatus || 'not_run'})</summary>`,
208+
'',
209+
'```text',
210+
output,
211+
'```',
212+
'</details>',
213+
].join('\n');
214+
};
203215
204216
const rows = checkedPlugins.length > 0
205217
? checkedPlugins.map((entry) => {
@@ -211,6 +223,21 @@ jobs:
211223
return `| ${name} | ${quality.vally_lint_status || 'not_run'} | ${quality.smoke_status || 'not_run'} | ${quality.overall_status || 'not_run'} | ${sourceCell} |`;
212224
})
213225
: ['| _none_ | not_run | not_run | not_run | _n/a_ |'];
226+
const failureDetails = checkedPlugins.flatMap((entry) => {
227+
const name = String(entry?.name || 'unknown');
228+
const quality = entry?.quality || {};
229+
const shouldShowVally = quality.vally_lint_status === 'fail' || quality.vally_lint_status === 'infra_error' || String(quality.vally_lint_output || '').trim().length > 0;
230+
const shouldShowSmoke = quality.smoke_status === 'fail' || quality.smoke_status === 'infra_error' || String(quality.smoke_output || '').trim().length > 0;
231+
232+
const details = [];
233+
if (shouldShowVally) {
234+
details.push(formatGateOutput(name, 'vally lint', quality.vally_lint_status, quality.vally_lint_output));
235+
}
236+
if (shouldShowSmoke) {
237+
details.push(formatGateOutput(name, 'install smoke test', quality.smoke_status, quality.smoke_output));
238+
}
239+
return details;
240+
});
214241
215242
const body = [
216243
marker,
@@ -225,6 +252,14 @@ jobs:
225252
'|---|---|---|---|---|',
226253
...rows,
227254
'',
255+
...(failureDetails.length > 0
256+
? [
257+
'### Gate output details',
258+
'',
259+
...failureDetails,
260+
'',
261+
]
262+
: []),
228263
String(qualityResult.summary || '').trim() || '_No summary provided._',
229264
].join('\n');
230265

eng/external-plugin-quality-gates.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function cloneSubmissionRepository(workDir, plugin) {
140140
// NOTE: Keep in sync with EXTERNAL_PLUGIN_ROOT_MANIFEST_PATHS in external-plugin-validation.mjs
141141
const PLUGIN_JSON_CANDIDATES = [
142142
[".github", "plugin", "plugin.json"],
143-
[".plugins", "plugin.json"],
143+
[".plugin", "plugin.json"],
144144
["plugin.json"],
145145
];
146146

eng/external-plugin-validation.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const EXTERNAL_PLUGIN_POLICIES = Object.freeze({
2727
const EXTERNAL_PLUGIN_ROOT_MANIFEST_PATHS = Object.freeze([
2828
"plugin.json",
2929
".github/plugin/plugin.json",
30-
".plugins/plugin.json",
30+
".plugin/plugin.json",
3131
]);
3232

3333
function resolvePolicy(policy) {

0 commit comments

Comments
 (0)