Skip to content

feat: open the pull request comment on a report card drawn by an evlog cloud app - #13

Closed
HugoRCD wants to merge 1 commit into
mainfrom
feat/report-cards
Closed

HugoRCD wants to merge 1 commit into
mainfrom
feat/report-cards

Conversation

@HugoRCD

@HugoRCD HugoRCD commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Written by an AI agent on behalf of @HugoRCD. @HugoRCD has not reviewed it yet.

A new cards-url input posts each run to an evlog cloud app (evloghq/evlog#1075), which stores it with the base branch's score history and draws the report as an SVG card. The comment then opens on that card. Without the input, the comment is unchanged.

On a real pull request

The cards job on #13 posted this comment through the deployment at https://evlog-cloud.vercel.app (the comment). The fixtures are the same on main and the PR, and main has one recorded point, so the card shows coverage and the entry points to fix first instead of a trend.

#13, GitHub dark #13, GitHub light
Card on evloghq/action#13, GitHub dark Card on evloghq/action#13, GitHub light

With history and changes (demo data): a scratch shop with six pushes on main, then a PR that drops user.id, cart.total and the checkout.completed audit, and removes the wide event from GET /api/orders/:id. Rendered by the same app code from a local run of the action.

Card for a PR that drops fields, demo data

What changed

  • cards-url input (validated as http(s) in inputs.mjs) and a cards-url output with the run page, empty when no cards were drawn.
  • src/lib/cards.mjs builds the run from the scan results, including each entry point's event at the base and the head, and authenticates with a GitHub Actions OIDC token (audience https://evlog.cloud). If the token is missing or the app refuses the run, the action logs a notice and posts the plain comment.
  • The comment with cards: the card, then the gate as a CAUTION alert that says what merging drops from production logs ("drops 4 fields and 1 audit action, takes GET /api/orders/:id dark") with links into the diff, then the wide event diff as a diff block and the full check grid, both folded.
  • cards job in test.yml: on this repository's own PRs it scans the fixtures with the @evlog/cli preview from feat(cli): record the wide event each entry point carries in evlog map evlog#1075, posts to https://evlog-cloud.vercel.app, comments under its own comment-key, and asserts that the output points at a stored run whose card is served as image/svg+xml.

Usage

permissions:
  contents: read
  pull-requests: write
  id-token: write
# ...
      - uses: evloghq/action@v1
        with:
          cards-url: https://evlog-cloud.vercel.app

Validation

  • npm run check and npm test: 99 pass, including the new cards.test.mjs cases for the payload, the degraded paths and the comment layout.
  • The cards job on this PR is the end to end check: it passes, and its comment is the capture above.

ELI5: when someone opens a pull request, the action already writes a comment about how well the code logs. With this, the comment opens on a picture that shows the score over time and which logged details the change would lose.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Observability score · 64

needs work

2 instrumented · 0 partial · 2 dark

Fix first (2)

evlog map v0.8.0 · how the score works · what each check expects

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Observability score 64 (±0 against main)

All 8 entry points, fix first

Every entry point by check

Note

No min-score set. Add min-score: 64 to keep today's score from dropping.

evlog map v0.11.2 · how the score works · what each check expects

Comment thread test/cards.test.mjs Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants