Commit 4520043
♻️ refactor(ci): post PR reviews as inline threaded comments (#82)
Rework the Claude Code Review workflow to submit a single review with
per-line inline comments (severity-tagged 🔴/🟡/🔵) and a structured
summary body, instead of one monolithic PR comment.
Why:
- Inline comments attach feedback to the exact lines it concerns,
matching the workflow already used by .claude/commands/review_pr.md.
- A single review carries a clear verdict (REQUEST_CHANGES / APPROVE /
COMMENT) derived from the highest-severity finding.
Changes:
- Replace the prompt with review criteria, inline-comment schema, a
single-call submission recipe via `gh api POST /pulls/.../reviews`,
and a summary-body template.
- Drop redundant `gh pr view` / `gh pr diff` steps — PR context is
already provided by claude-code-action; use ${{ github.repository }}
and ${{ github.event.pull_request.head.sha }} instead.
- Bump `pull-requests` permission from `read` to `write` so the job
can POST the review.
- Allow `Bash(gh api:*)` in claude_args.
- Add `Bash(git checkout -b *)` to local settings allowlist.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent fe2c672 commit 4520043
2 files changed
Lines changed: 70 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
51 | 107 | | |
52 | 108 | | |
53 | | - | |
54 | | - | |
| 109 | + | |
0 commit comments