Skip to content

feat: compact pr-comment format for GitHub Action PR comments#80

Merged
KryptosAI merged 1 commit intomainfrom
feat/pr-comment-reporter
Mar 23, 2026
Merged

feat: compact pr-comment format for GitHub Action PR comments#80
KryptosAI merged 1 commit intomainfrom
feat/pr-comment-reporter

Conversation

@KryptosAI
Copy link
Copy Markdown
Owner

Summary

  • Adds --format pr-comment — a compact, severity-tiered output designed for GitHub PR comments
  • 10 lines vs 146 for the current --format markdown (93% reduction)
  • Updates the GitHub Action to use pr-comment format by default
  • Every CI run now produces a scannable, eye-catching comment that PR reviewers actually read

What it looks like

When issues found:

## 🔭 MCP Observatory — 1 issue found

### ⚠️ QUALITY (1 warning)
> prompt "daily-brief": Argument 'topic' missing description

### 📊 Summary
> Health: **B** (82) · 1 tools · 1 prompts · 2 resources

---
<sub>🔭 MCP Observatory — test your MCP servers for breaking changes · ⭐ Star</sub>

When all clear:

## 🔭 MCP Observatory — All clear ✅

All checks passed. No security issues, no schema quality warnings.

### 📊 Summary
> Health: **A** (95) · 24 tools · 3 prompts · 5 resources

Design

  • Tiered output: Security (🔴) → Failing (🔴) → Quality (⚠️) → Summary (📊)
  • Max 5 items per section with "...and N more" truncation
  • Handles both RunArtifact (single scan) and DiffArtifact (regression comparison)
  • Diff mode shows: Regressions → Schema Drift → Recoveries → Summary
  • Branded footer with repo link and star CTA

Files changed

File Change
src/reporters/pr-comment.ts NEW — 195-line renderer
src/index.ts Added export
src/commands/helpers.ts Added format dispatch
src/commands/legacy.ts Added format option
src/commands/diff.ts Added format option
action/action.yml Switched to pr-comment, removed double-wrapping
tests/pr-comment.test.ts NEW — 14 tests

Test plan

  • npm run build — clean compile
  • npx vitest run — 236/236 tests pass (14 new)
  • Manual test: mcp-observatory report <artifact> --format pr-comment against fixture server
  • Verified output is <30 lines for typical scans
  • CI pipeline validates on push

🤖 Generated with Claude Code

Add a new `--format pr-comment` output that generates severity-tiered,
scannable PR comments (10 lines vs 146 for markdown). Designed to make
every CI run visible to PR reviewers — security findings, regressions,
schema drift, and quality warnings at a glance.

- New `src/reporters/pr-comment.ts` with Run + Diff artifact support
- Tiered output: Security (red) → Breaking (red) → Quality (yellow) → Summary
- Max 5 items per section with overflow truncation
- Health score, capability counts, and branded footer with star link
- Action updated to use pr-comment format by default
- 14 new tests, all 236 tests pass

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@KryptosAI KryptosAI merged commit 13b37ad into main Mar 23, 2026
1 of 2 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 0.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant