fix: handle-pr-review summary SHA interpolation (NES-1519)#8942
Conversation
- Fix step 9 in Cursor skill to resolve `git rev-parse --short HEAD` before posting the summary comment, avoiding single-quoted heredocs (`<<'EOF'`) that prevent shell variable expansion - Create Claude Code command at `.claude/commands/handle-pr-review.md`, ported from the workspace version which already has the fix - Add cross-reference sync comments to both files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WalkthroughAdds a detailed PR review workflow command specification and synchronizes the corresponding skill documentation to adjust PR summary generation (including dynamic commit SHA insertion and updated summary formatting). Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
View your CI Pipeline Execution ↗ for commit b75159b
☁️ Nx Cloud last updated this comment at |
Address review concerns: - Make sync comments directional: command is the canonical version, Cursor skill is a simplified subset - Reference section names instead of step numbers in cross-references to avoid brittleness when steps are renumbered Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.claude/commands/handle-pr-review.md (1)
118-135: Optional: Add language identifier to fenced code block.The triage example could specify
markdownas the language for better syntax highlighting and to satisfy linters.📝 Optional improvement
-``` +```markdown ## Triage — PR `#123` **Will fix:**🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/commands/handle-pr-review.md around lines 118 - 135, The fenced code block in the triage example lacks a language identifier; update the opening backticks for the block that contains "## Triage — PR `#123`" to include "markdown" (i.e., change ``` to ```markdown) so linters and syntax highlighters correctly treat the content as Markdown; locate the block in .claude/commands/handle-pr-review.md around the example snippet and apply this single-line edit to the fenced code opener.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.claude/commands/handle-pr-review.md:
- Around line 118-135: The fenced code block in the triage example lacks a
language identifier; update the opening backticks for the block that contains
"## Triage — PR `#123`" to include "markdown" (i.e., change ``` to ```markdown) so
linters and syntax highlighters correctly treat the content as Markdown; locate
the block in .claude/commands/handle-pr-review.md around the example snippet and
apply this single-line edit to the fenced code opener.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 1683d5f8-81d6-4e2d-8d35-afa87e87513e
📒 Files selected for processing (2)
.claude/commands/handle-pr-review.md.cursor/skills/handle-pr-review/SKILL.md
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.claude/commands/handle-pr-review.md (1)
118-134: Add language identifier to fenced code block.The code block showing the triage output example should specify a language identifier for proper rendering. Consider using
markdownortext.📝 Proposed fix
Present the triage to the user for confirmation before proceeding: -``` +```text ## Triage — PR `#123` **Will fix:**As per coding guidelines: markdownlint-cli2 requires fenced code blocks to have a language specified (MD040).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.claude/commands/handle-pr-review.md around lines 118 - 134, The fenced code block in the triage example lacks a language identifier (MD040); update the opening triple-backticks in .claude/commands/handle-pr-review.md for the triage output block to include a language (e.g., change ``` to ```text or ```markdown) so the block is lint-compliant; ensure only the opening fence is modified for the block that begins with "## Triage — PR `#123`" and leave the block contents unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.claude/commands/handle-pr-review.md:
- Around line 118-134: The fenced code block in the triage example lacks a
language identifier (MD040); update the opening triple-backticks in
.claude/commands/handle-pr-review.md for the triage output block to include a
language (e.g., change ``` to ```text or ```markdown) so the block is
lint-compliant; ensure only the opening fence is modified for the block that
begins with "## Triage — PR `#123`" and leave the block contents unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e390acad-b632-4ed5-b014-4edeb06d1a15
📒 Files selected for processing (2)
.claude/commands/handle-pr-review.md.cursor/skills/handle-pr-review/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
- .cursor/skills/handle-pr-review/SKILL.md
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Summary
handle-pr-reviewCursor skill step 9 summary comment to resolvegit rev-parse --short HEADbefore posting, replacing the single-quoted heredoc (<<'EOF') that prevented shell variable expansion of$COMMIT_SHA.claude/commands/handle-pr-review.md, ported from the workspace version which already has the fixCloses NES-1519
Test plan
/handle-pr-reviewon any core PR and verify the summary comment shows the actual commit SHA (e.g.abc1234) instead of the literal$COMMIT_SHAstring/handle-pr-review🤖 Generated with Claude Code
Summary by CodeRabbit