Skip to content

Commit e03a472

Browse files
katchu11claude
andcommitted
Update CI fix comment format to match code review style
- Changed from inline links to numbered list with separate lines - Matches code review format: description on line 1, GitHub link on line 2 - Updated examples to show exact format required - Clearer instructions to follow code review pattern 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
1 parent adb3786 commit e03a472

File tree

1 file changed

+87
-51
lines changed

1 file changed

+87
-51
lines changed

.claude/commands/fix-ci-signed.md

Lines changed: 87 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -134,32 +134,38 @@ Note: The branch will be created from the Base Branch specified in the context.
134134

135135
After successfully pushing the fixes, create an informative comment on the original PR.
136136

137-
### Part A: Prepare Fix Summary with Proper GitHub Links
137+
### Part A: Prepare Fix Summary (FOLLOW CODE REVIEW FORMAT)
138138

139139
1. **Get the full commit SHA** from your pushed fix branch:
140140
```bash
141141
COMMIT_SHA=$(git rev-parse HEAD)
142142
echo "Commit SHA: $COMMIT_SHA"
143143
```
144144

145-
2. **For each file you modified**, create a summary with GitHub permalink:
146-
- Identify the fix type: lint error, type error, test failure, etc.
147-
- Note the primary line number where the fix was applied
148-
- Create a GitHub permalink with 1 line of context (line before and after)
145+
2. **For each file you modified**, create a numbered list entry:
146+
- Brief description of what was fixed (NOT the error itself)
147+
- File path relative to repo root
148+
- GitHub permalink on the next line
149149

150-
**FORMAT**: `Fix-type in [\`filename:line\`](permalink)`
151-
152-
**CRITICAL LINK FORMAT** (must match exactly):
150+
**FORMAT (MUST MATCH EXACTLY):**
153151
```
154-
https://github.com/OWNER/REPO/blob/FULL_SHA/path/to/file.ext#LSTART-LEND
152+
1. <what was fixed> in <file>
153+
https://github.com/OWNER/REPO/blob/FULL_SHA/path/to/file#LSTART-LEND
155154
```
155+
156+
**CRITICAL REQUIREMENTS**:
156157
- Use FULL commit SHA (40 characters), not abbreviated
157-
- Line range format: `#L10-L12` (for line 11 with context)
158-
- Include 1 line before and after the fix (e.g., fix on line 41 → link to L40-L42)
158+
- Line range format: `#L10-L12` (include 1 line before and after)
159+
- Put link on its own line (like code review does)
160+
- NO inline links, NO markdown link syntax
159161

160-
3. **Combine summaries** with bullet separator:
162+
3. **Example of CORRECT format**:
161163
```
162-
SUMMARY1 • SUMMARY2 • SUMMARY3
164+
1. Missing semicolon in utils/helper.ts
165+
https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/src/utils/helper.ts#L40-L42
166+
167+
2. Type mismatch in api/client.ts
168+
https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/src/api/client.ts#L98-L100
163169
```
164170

165171
### Part B: Check for Duplicate Comments
@@ -172,57 +178,86 @@ gh api repos/REPOSITORY/issues/PR_NUMBER/comments --jq '.[] | select(.user.login
172178

173179
**If the command returns any IDs**: STOP - do not create a new comment.
174180

175-
### Part C: Create the PR Comment
181+
### Part C: Create the PR Comment (MUST MATCH CODE REVIEW FORMAT)
176182

177183
**Execute this exact command** (replace placeholders with actual values):
178184

179185
```bash
180-
gh pr comment PR_NUMBER --body "### 🤖 CI Auto-Fix Available
186+
gh pr comment PR_NUMBER --body "### CI fixes
187+
188+
Fixed N issues:
181189
182-
Fixed: FIX_SUMMARIES
190+
FIX_SUMMARIES
183191
184192
**[→ Create PR with fixes](https://github.com/OWNER/REPO/compare/BASE_BRANCH...FIX_BRANCH?quick_pull=1)**
185193
186-
🤖 Generated with [Claude Code](https://claude.ai/code) • [Failed CI run](CI_RUN_URL)"
194+
🤖 Generated with [Claude Code](https://claude.ai/code)"
195+
```
196+
197+
**WHERE FIX_SUMMARIES FORMAT IS:**
198+
```
199+
1. <brief description of what was fixed> in <file>
200+
https://github.com/OWNER/REPO/blob/FULL_SHA/path/to/file#LSTART-LEND
201+
202+
2. <brief description of what was fixed> in <file>
203+
https://github.com/OWNER/REPO/blob/FULL_SHA/path/to/file#LSTART-LEND
187204
```
188205

189-
### COMPLETE EXAMPLES
206+
### COMPLETE EXAMPLES (FOLLOW THESE EXACTLY)
190207

191-
**Example 1** - Multiple fixes (assuming PR #123, commit sha abc123...):
208+
**Example 1** - Multiple fixes:
192209
```bash
193-
gh pr comment 123 --body "### 🤖 CI Auto-Fix Available
210+
gh pr comment 123 --body "### CI fixes
211+
212+
Fixed 3 issues:
213+
214+
1. Missing semicolon in utils/helper.ts
215+
https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/src/utils/helper.ts#L40-L42
216+
217+
2. Type mismatch in api/client.ts
218+
https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/src/api/client.ts#L98-L100
194219
195-
Fixed: Missing semicolon in [\`utils/helper.ts:41\`](https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/src/utils/helper.ts#L40-L42) • Type mismatch in [\`api/client.ts:99\`](https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/src/api/client.ts#L98-L100) • Undefined variable in [\`tests/auth.test.ts:55\`](https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/tests/auth.test.ts#L54-L56)
220+
3. Undefined variable in tests/auth.test.ts
221+
https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/tests/auth.test.ts#L54-L56
196222
197223
**[→ Create PR with fixes](https://github.com/anthropics/claude-cli-internal/compare/main...claude-auto-fix-ci-signed-feature-xyz-28476234)**
198224
199-
🤖 Generated with [Claude Code](https://claude.ai/code) • [Failed CI run](https://github.com/anthropics/claude-cli-internal/actions/runs/17282789906)"
225+
🤖 Generated with [Claude Code](https://claude.ai/code)"
200226
```
201227

202228
**Example 2** - Single fix:
203229
```bash
204-
gh pr comment 456 --body "### 🤖 CI Auto-Fix Available
230+
gh pr comment 456 --body "### CI fixes
205231
206-
Fixed: Import statement error in [\`index.ts:5\`](https://github.com/anthropics/claude-cli-internal/blob/def4567890abcdef1234567890abcdef123456789/src/index.ts#L4-L6)
232+
Fixed 1 issue:
233+
234+
1. Import statement error in index.ts
235+
https://github.com/anthropics/claude-cli-internal/blob/def4567890abcdef1234567890abcdef123456789/src/index.ts#L4-L6
207236
208237
**[→ Create PR with fixes](https://github.com/anthropics/claude-cli-internal/compare/develop...claude-auto-fix-ci-signed-bugfix-28476235)**
209238
210-
🤖 Generated with [Claude Code](https://claude.ai/code) • [Failed CI run](https://github.com/anthropics/claude-cli-internal/actions/runs/17282789907)"
239+
🤖 Generated with [Claude Code](https://claude.ai/code)"
211240
```
212241

213-
### CRITICAL REQUIREMENTS
242+
### CRITICAL FORMAT REQUIREMENTS
243+
244+
1. **MUST use numbered list format**:
245+
- ✅ CORRECT: `1. Missing semicolon in utils/helper.ts`
246+
- ❌ WRONG: `Fixed: Missing semicolon in utils/helper.ts`
247+
- ❌ WRONG: `- Missing semicolon in utils/helper.ts`
248+
249+
2. **GitHub link MUST be on its own line**:
250+
- ✅ CORRECT: Description on line 1, link on line 2
251+
- ❌ WRONG: `Missing semicolon in [\`file.ts:41\`](link)`
252+
- ❌ WRONG: Inline links with description
214253

215-
1. **Link format MUST be exact**:
254+
3. **Link format MUST be exact**:
216255
- ✅ CORRECT: `https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/src/file.ts#L10-L12`
217-
- ❌ WRONG: `https://github.com/anthropics/claude-cli-internal/blob/abc123/src/file.ts#L11`
218-
- ❌ WRONG: Missing `#L` prefix or `-L` in range
219256
- ❌ WRONG: Abbreviated SHA
257+
- ❌ WRONG: Missing `#L` prefix or `-L` in range
258+
- ❌ WRONG: Wrong line range format
220259

221-
2. **Fix summaries MUST be concise**:
222-
- ✅ GOOD: "Missing semicolon in [`file.ts:41`](link)"
223-
- ❌ BAD: "Fixed missing semicolon issue in TypeScript file [`file.ts:41`](link) that was causing build to fail"
224-
225-
3. **MUST use bullet separator** (``) between multiple fixes, not commas or newlines
260+
4. **Follow code review workflow pattern exactly** - see /code-review command for reference
226261

227262
## Step 7: Final Verification
228263

@@ -239,36 +274,37 @@ Fixed: Import statement error in [\`index.ts:5\`](https://github.com/anthropics/
239274
- Failed CI run reference
240275
4. ✅ Verified no duplicate comments were created
241276

242-
### FINAL OUTPUT FORMAT
277+
### FINAL OUTPUT FORMAT (MUST MATCH CODE REVIEW STYLE)
243278

244-
Your PR comment MUST follow this exact format (example with 3 fixes):
279+
Your PR comment MUST follow this exact format:
245280

246281
---
247282

248-
### 🤖 CI Auto-Fix Available
283+
### CI fixes
249284

250-
Fixed: Missing semicolon in [`utils/helper.ts:41`](https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/src/utils/helper.ts#L40-L42) • Type mismatch in [`api/client.ts:99`](https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/src/api/client.ts#L98-L100) • Undefined variable in [`tests/auth.test.ts:55`](https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/tests/auth.test.ts#L54-L56)
285+
Fixed 3 issues:
251286

252-
**[→ Create PR with fixes](https://github.com/anthropics/claude-cli-internal/compare/main...claude-auto-fix-ci-signed-feature-xyz-28476234)**
287+
1. Missing semicolon in utils/helper.ts
288+
https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/src/utils/helper.ts#L40-L42
253289

254-
🤖 Generated with [Claude Code](https://claude.ai/code)[Failed CI run](https://github.com/anthropics/claude-cli-internal/actions/runs/17282789906)
290+
2. Type mismatch in api/client.ts
291+
https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/src/api/client.ts#L98-L100
255292

256-
---
257-
258-
Or for a single fix:
293+
3. Undefined variable in tests/auth.test.ts
294+
https://github.com/anthropics/claude-cli-internal/blob/abc1234567890abcdef1234567890abcdef123456/tests/auth.test.ts#L54-L56
259295

260-
---
261-
262-
### 🤖 CI Auto-Fix Available
263-
264-
Fixed: Import statement error in [`index.ts:5`](https://github.com/anthropics/claude-cli-internal/blob/def4567890abcdef1234567890abcdef123456789/src/index.ts#L4-L6)
265-
266-
**[→ Create PR with fixes](https://github.com/anthropics/claude-cli-internal/compare/develop...claude-auto-fix-ci-signed-bugfix-28476235)**
296+
**[→ Create PR with fixes](https://github.com/anthropics/claude-cli-internal/compare/main...claude-auto-fix-ci-signed-feature-xyz-28476234)**
267297

268-
🤖 Generated with [Claude Code](https://claude.ai/code)[Failed CI run](https://github.com/anthropics/claude-cli-internal/actions/runs/17282789907)
298+
🤖 Generated with [Claude Code](https://claude.ai/code)
269299

270300
---
271301

302+
This format:
303+
- Uses numbered lists (1., 2., 3.) not bullet points
304+
- Puts GitHub links on their own line below each description
305+
- Matches the code review workflow format exactly
306+
- Does NOT use inline links like [`file.ts:41`](link)
307+
272308
**THE TASK IS NOT COMPLETE** until the PR comment is created with this exact format.
273309

274310
## Important Guidelines

0 commit comments

Comments
 (0)