Skip to content

ci: upload HTML review report as artifact#728

Merged
lklimek merged 3 commits intov1.0-devfrom
ci/review-html-report-artifact
Mar 11, 2026
Merged

ci: upload HTML review report as artifact#728
lklimek merged 3 commits intov1.0-devfrom
ci/review-html-report-artifact

Conversation

@lklimek
Copy link
Copy Markdown
Contributor

@lklimek lklimek commented Mar 11, 2026

Summary

  • Instruct grumpy-review to render HTML instead of markdown (interactive report with Chart.js charts, severity filtering, sorting)
  • Save report.json + report.html to a known directory ($REPORT_DIR)
  • Add upload-artifact step so the report is downloadable from the Actions run (14-day retention)
  • Add Bash(cp *) to allowed tools for file operations

Test plan

  • Trigger a review on a test PR with the claudius-review label
  • Verify grumpy-review produces report.html (not just report.md)
  • Verify the artifact claude-review-report-pr-<N> appears in the Actions run
  • Download the artifact ZIP, extract, and open report.html — confirm charts and filtering work
  • Verify artifact is skipped gracefully if no report was produced (e.g. timeout)

No manual test scenario file needed — this is a CI-only change.

🤖 Co-authored by Claudius the Magnificent AI Agent

Summary by CodeRabbit

  • New Features
    • Code review reports are now automatically generated and uploaded as HTML and JSON artifacts for easy access and sharing.
    • Reports are retained for 14 days.
    • Uploads occur when the review run completes (skips cancelled runs) and artifacts are organized per pull request for straightforward retrieval.

Instruct grumpy-review to render HTML instead of markdown and save
report.json + report.html to a known directory. Add upload-artifact
step so the interactive report (with Chart.js charts, severity
filtering, sorting) is downloadable from the Actions run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 11, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fc920979-a10e-48dd-8523-eda42e0cf471

📥 Commits

Reviewing files that changed from the base of the PR and between b138b7d and 569341c.

📒 Files selected for processing (1)
  • .github/workflows/claude-code-review.yml

📝 Walkthrough

Walkthrough

This change updates the Claude code-review GitHub workflow to add a REPORT_DIR env var, ensure the directory exists, instruct Claude to render HTML and write report.json/report.html, and upload those files as a GitHub artifact.

Changes

Cohort / File(s) Summary
GitHub workflow: report generation & upload
.github/workflows/claude-code-review.yml
Added REPORT_DIR env var and mkdir step, updated Claude review to render HTML and write report.json/report.html to REPORT_DIR, and added an "Upload review report" artifact step (uploads reports, retention 14 days, ignores if missing).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 I hopped through CI, nose all a-gleam,

Saved reports in HTML, a rabbit's dream,
report.json snug, artifacts stacked high,
Retained for two weeks beneath GitHub sky,
I celebrate with a twitch and a sigh.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly matches the main objective: configuring the CI pipeline to upload an HTML review report as an artifact.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/review-html-report-artifact

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@lklimek lklimek requested a review from Copilot March 11, 2026 08:52
@lklimek lklimek marked this pull request as ready for review March 11, 2026 08:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Claude/Claudius GitHub Actions workflow to produce an HTML (and JSON) review report and upload it as a downloadable Actions artifact, enabling interactive review output to be retrieved from CI runs.

Changes:

  • Adds a REPORT_DIR environment variable to standardize where the review report outputs are written.
  • Updates the review instructions/allowed tools to support HTML report generation and file operations.
  • Uploads the generated report directory as an Actions artifact with a 14-day retention period.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/claude-code-review.yml Outdated
Comment thread .github/workflows/claude-code-review.yml Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/claude-code-review.yml:
- Line 29: The workflow sets REPORT_DIR but never ensures it exists, so create
the directory before Claude runs by adding a step that runs mkdir -p "${{
github.workspace }}/review-report" (i.e., mkdir -p "$REPORT_DIR") and ensure
that this step executes prior to any steps referencing REPORT_DIR (including the
Claude invocation and the artifact collection step that copies/writes files).
Update or add the pre-flight/setup job step so REPORT_DIR is created with
correct permissions and is available for subsequent steps that write files into
it.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 41e2fbc8-ee38-4289-92e9-122d9a3dc7d3

📥 Commits

Reviewing files that changed from the base of the PR and between 768a834 and b138b7d.

📒 Files selected for processing (1)
  • .github/workflows/claude-code-review.yml

Comment thread .github/workflows/claude-code-review.yml
lklimek and others added 2 commits March 11, 2026 10:07
Address bot review comments:
- Pre-create $REPORT_DIR before Claude runs (CodeRabbit)
- Remove Bash(cp *) from allowed tools; write directly to $REPORT_DIR (Copilot)
- Upload only report.json and report.html, not the whole directory (Copilot)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lklimek lklimek merged commit fd0bb08 into v1.0-dev Mar 11, 2026
0 of 2 checks passed
@lklimek lklimek deleted the ci/review-html-report-artifact branch March 11, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants