Skip to content

Commit 154bddb

Browse files
nikhilNavaCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c483e9a commit 154bddb

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎.claude/commands/post-review-comments.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Post Review Comments to GitHub
22

3-
Post code review findings from a review file (generated by `/review-pr` or `/review-staged`) as comments on the associated GitHub pull request.
3+
Post code review findings from a review file (generated by `/review-pr`) as comments on the associated GitHub pull request.
44

55
## Usage
66

@@ -311,7 +311,7 @@ gh pr comment <PR_NUMBER> --body "$(cat <<'EOF'
311311
<description>
312312
313313
#### Diff Context
314-
```python
314+
```diff
315315
<diff_context>
316316
```
317317

‎.claude/commands/review-pr.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ First, collect information about the pull request:
4343

4444
3. **IMPORTANT**: Save the diff output - you will need it to:
4545
- Include relevant diff context snippets in each finding
46-
- Determine the exact **diff line numbers** for inline comments (line numbers as they appear in the diff, not file line numbers)
46+
- Determine the exact **target file line numbers** for inline comments (absolute line numbers in the target file, computed from the diff hunk headers, as required by `/post-review-comments`)
4747
- Determine the **side** (RIGHT for additions `+`, LEFT for deletions `-`)
4848

4949
4. Create the `.codereviews/` directory if it doesn't exist.

‎.claude/commands/review-staged.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ First, collect information about the staged changes:
3030

3131
3. **IMPORTANT**: Save the diff output - you will need it to:
3232
- Include relevant diff context snippets in each finding
33-
- Determine the exact **diff line numbers** for inline comments (line numbers as they appear in the diff, not file line numbers)
33+
- Determine the exact **Diff Line** values for inline comments (absolute line numbers in the target file; use the diff hunks to map changes to their file line numbers)
3434
- Determine the **side** (RIGHT for additions `+`, LEFT for deletions `-`)
3535

3636
4. If there are no staged changes, inform the user and suggest they stage files with `git add`.

0 commit comments

Comments
 (0)