Skip to content

Commit dd838ef

Browse files
committed
fix: cc comment prompt
1 parent c1dbde0 commit dd838ef

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

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

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,15 @@ jobs:
120120
For each significant issue (max 5 per file), post an inline comment using:
121121
122122
```bash
123-
gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number || github.event.inputs.pr_number }}/comments \
124-
-f body="COMMENT_BODY" \
125-
-f path="relative/path/to/file.ts" \
126-
-F line=42 \
127-
-f side="RIGHT" \
128-
-f commit_id="${{ github.event.pull_request.head.sha || github.sha }}"
123+
gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number || github.event.inputs.pr_number }}/comments -f body="COMMENT_BODY" -f path="relative/path/to/file.ts" -F line=42 -f side="RIGHT" -f commit_id="${{ github.event.pull_request.head.sha || github.sha }}"
129124
```
130125
131126
**IMPORTANT:**
127+
- Use a SINGLE LINE command (no backslashes or line continuations)
132128
- For this PR, use: `gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number || github.event.inputs.pr_number }}/comments`
133129
- Commit SHA: `${{ github.event.pull_request.head.sha || github.sha }}`
134130
- Post comments for EVERY significant issue you find (not just a summary)
131+
- Keep the body text concise and use \n for line breaks within the body parameter
135132
136133
**Inline Comment Format:**
137134
- Use emoji severity: 🔴 Critical | 🟡 Important | 🔵 Consider
@@ -142,14 +139,11 @@ jobs:
142139
143140
**Example:**
144141
```
145-
🔴 **[Security]**: Potential SQL injection vulnerability. User input is concatenated directly into SQL query.
146-
147-
**Fix:** Use parameterized queries:
148-
\`\`\`typescript
149-
const result = await query('SELECT * FROM users WHERE name = $1', [userName]);
150-
\`\`\`
142+
🔴 **[Security]**: Potential SQL injection vulnerability. User input is concatenated directly into SQL query.\n\n**Fix:** Use parameterized queries:\n\`\`\`typescript\nconst result = await query('SELECT * FROM users WHERE name = $1', [userName]);\n\`\`\`
151143
```
152144
145+
Note: In the actual gh command, newlines are represented as \n within the body parameter.
146+
153147
### Step 4: Post Summary Comment
154148
After posting inline comments, create a summary with:
155149
- Review statistics (files, lines, issues)

0 commit comments

Comments
 (0)