You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nightly report: post details as follow-up comments instead of truncating (#1239)
When the full report exceeds GitHub's 65K body limit, the summary
table stays in the discussion/issue body and the verbose skill/agent
output is posted as follow-up comments (split into chunks if needed).
This ensures no output is lost.
// ── Body size management ──────────────────────────────
213
+
// GitHub body limit is ~65536 UTF-8 bytes for both
214
+
// Discussions and Issues. When the full report fits, we
215
+
// inline everything. When it doesn't, the body gets a
216
+
// compact summary and the verbose sections are written to
217
+
// separate files that get posted as follow-up comments.
218
+
const MAX_BYTES = 65000; // leave margin
219
+
220
+
function makeDetailsBlock(heading, summary, content) {
221
+
return [
222
+
`## ${heading}`, '',
223
+
'<details>',
224
+
`<summary>${summary}</summary>`, '',
225
+
'```', content, '```', '',
226
+
'</details>',
227
+
].join('\n');
228
+
}
229
+
230
+
const summaryLines = [
231
+
`# ${title}`, '',
232
+
`**${skillDirs.length} skills** and **${agentFiles.length} agents** scanned.`, '',
233
+
'| Severity | Count |',
234
+
'|----------|-------|',
216
235
`| ⛔ Errors | ${errorCount} |`,
217
236
`| ⚠️ Warnings | ${warningCount} |`,
218
-
`| ℹ️ Advisories | ${advisoryCount} |`,
219
-
'',
220
-
'---',
221
-
'',
222
-
'## Skills',
223
-
'',
224
-
'<details>',
225
-
'<summary>Full skill-validator output for skills</summary>',
226
-
'',
227
-
'```',
228
-
annotateWithAuthors(skillsOutput, 'skill'),
229
-
'```',
230
-
'',
231
-
'</details>',
232
-
'',
233
-
'## Agents',
234
-
'',
235
-
'<details>',
236
-
'<summary>Full skill-validator output for agents</summary>',
237
-
'',
238
-
'```',
239
-
annotateWithAuthors(agentsOutput, 'agent'),
240
-
'```',
241
-
'',
242
-
'</details>',
243
-
'',
237
+
`| ℹ️ Advisories | ${advisoryCount} |`, '',
244
238
'---',
245
-
'',
246
-
`_Generated by the [Skill Validator nightly scan](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/workflows/skill-quality-report.yml)._`,
247
-
].join('\n');
248
-
249
-
core.setOutput('title', title);
250
-
core.setOutput('body_file', 'report-body.md');
251
-
252
-
// GitHub Issues/Discussions enforce a body size limit on the
253
-
// UTF-8 payload (~65536 bytes). Use byte-based limits and prefer
254
-
// shrinking verbose <details> sections to keep markdown valid.
255
-
const MAX_BODY_BYTES = 65000; // leave some margin
const footer = `\n---\n\n_Generated by the [Skill Validator nightly scan](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/workflows/skill-quality-report.yml)._`;
241
+
242
+
const skillsBlock = makeDetailsBlock('Skills', 'Full skill-validator output for skills', annotatedSkills);
243
+
const agentsBlock = makeDetailsBlock('Agents', 'Full skill-validator output for agents', annotatedAgents);
const truncNote = '\n\n> **Note:** Output was truncated to fit GitHub\'s body size limit. See the [workflow run](https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/workflows/skill-quality-report.yml) for full output.\n';
0 commit comments