Skip to content

Commit fd0bb08

Browse files
lklimekclaude
andauthored
ci: upload HTML review report as artifact (#728)
* ci: upload HTML review report as artifact 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> * ci: harden report artifact — pre-create dir, drop cp, explicit paths 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> * ci: simplify prompt — drop redundant directory note Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 768a834 commit fd0bb08

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/claude-code-review.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
id-token: write
2727
env:
2828
CLAUDE_MODEL: ${{ vars.CLAUDE_MODEL || 'opus' }}
29+
REPORT_DIR: ${{ github.workspace }}/review-report
2930
steps:
3031
- name: Check for OAuth token
3132
env:
@@ -45,6 +46,9 @@ jobs:
4546
- name: Configure git to use HTTPS instead of SSH
4647
run: git config --global url."https://github.com/".insteadOf "git@github.com:"
4748

49+
- name: Create review report directory
50+
run: mkdir -p "$REPORT_DIR"
51+
4852
- name: Run Claude Code Review
4953
id: claude-review
5054
uses: anthropics/claude-code-action@v1
@@ -84,6 +88,8 @@ jobs:
8488
2. Invoke Skill(skill="claudius:grumpy-review") to perform a fresh code review.
8589
This spawns parallel specialist agents and produces a consolidated report.
8690
Do NOT review the code yourself — the skill handles the full pipeline.
91+
Generate HTML format instead of markdown (use --format html in the render step).
92+
Write the final report.json and report.html to $REPORT_DIR.
8793
3. Post only MEDIUM severity and higher findings as new inline PR comments.
8894
4. If no unresolved comments remain after the full flow, approve the PR.
8995
claude_args: |
@@ -92,6 +98,17 @@ jobs:
9298
--max-turns 150
9399
--allowedTools "mcp__plugin_claudius_github,Read,Write,Edit,Glob,Grep,Agent,Skill,Task,TaskCreate,TaskUpdate,TaskList,TaskGet,TaskOutput,SendMessage,Bash(gh pr *),Bash(gh api *),Bash(git diff *),Bash(git log *),Bash(git fetch *),Bash(git branch *),Bash(git rev-parse *),Bash(git show *),Bash(git pull *),Bash(git checkout *),Bash(git status),Bash(git status *),Bash(git remote *),Bash(git merge-base *),Bash(cat *),Bash(python3 *),Bash(echo *),Bash(ls *),Bash(grep *),Bash(mkdir *),Bash(mktemp *),Bash(pwd *)"
94100
101+
- name: Upload review report
102+
if: '!cancelled()'
103+
uses: actions/upload-artifact@v4
104+
with:
105+
name: claude-review-report-pr-${{ github.event.pull_request.number }}
106+
path: |
107+
${{ env.REPORT_DIR }}/report.json
108+
${{ env.REPORT_DIR }}/report.html
109+
retention-days: 14
110+
if-no-files-found: ignore
111+
95112
- name: Remove claudius-review label
96113
if: success()
97114
env:

0 commit comments

Comments
 (0)