Improve skills-validator invoking and outputs presenting#1387
Improve skills-validator invoking and outputs presenting#1387aaronpowell merged 1 commit intogithub:stagedfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Skill Validator PR comment workflow to present validator output in a more structured, Markdown-friendly format and to reduce invocation/output-related noise when posting results back to pull requests.
Changes:
- Sanitizes captured validator output (handles missing output file and strips ANSI color codes).
- Replaces keyword-based finding counts with emoji-based counts (❌/⚠/ℹ) and adds structured summary tables.
- Adds a compact “Summary” section plus a
<details>block containing the full validator output.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/skill-check-comment.yml |
Reformats the PR comment body with tables + summary extracted from validator output, and improves output handling/sanitization. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
| const summaryLines = highlightedLines.length > 0 | ||
| ? highlightedLines.slice(0, 10) | ||
| : output | ||
| .split('\n') | ||
| .map(line => line.trim()) | ||
| .filter(Boolean) | ||
| .filter(line => !line.startsWith('###')) | ||
| .slice(0, 10); |
There was a problem hiding this comment.
summaryLines falls back to the first 10 non-empty lines when no emoji-prefixed findings are detected. Since skill-validator output can include headers/info lines (e.g., "## ") even when there are no findings, this can populate the “Finding” table with non-findings and prevent the “No findings…” message from ever showing. Consider only building the findings table from highlightedLines (emoji-prefixed lines), and when that list is empty (and exitCode === '0'), render the no-findings message instead of a fallback slice of arbitrary output.
| const summaryLines = highlightedLines.length > 0 | |
| ? highlightedLines.slice(0, 10) | |
| : output | |
| .split('\n') | |
| .map(line => line.trim()) | |
| .filter(Boolean) | |
| .filter(line => !line.startsWith('###')) | |
| .slice(0, 10); | |
| const summaryLines = highlightedLines.slice(0, 10); |
Context
Fixing the skill-validator invocation to prevent invocation errors - e.g.:
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.