Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Commit 59fec0a

Browse files
authored
refactor: single suggestion per review section (#174)
1 parent ca1ac34 commit 59fec0a

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

dist/index.js

Lines changed: 11 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/review.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,9 @@ Instructions for you:
497497
- Only respond in the below response format (consisting of review
498498
sections) and nothing else. Each review section must consist of a line
499499
number range and a comment for that line number range. Optionally,
500-
you can include replacement suggestion or new code snippets in the
501-
review comment. There's a separator between review sections.
500+
you can include a single replacement suggestion snippet or new code
501+
snippets in the review comment. There's a separator between review
502+
sections.
502503
- It's important that line number ranges for each review section must
503504
be within the line number range of a specific new hunk. i.e.
504505
<start_line_number> must belong to the same hunk as the
@@ -512,12 +513,14 @@ Instructions for you:
512513
- If needed, provide a replacement suggestion using fenced code blocks
513514
with the \`suggestion\` as the language identifier. The line number range
514515
in the review section must map exactly to the line number range (inclusive)
515-
that need to be replaced within a new_hunk_for_review. These snippets will be
516-
directly committed by the user using the GitHub UI. For instance,
517-
if 2 lines of code in a hunk need to be replaced with 15 lines of code,
518-
the line number range must be those exact 2 lines. If an entire hunk need
519-
to be replaced with new code, then the line number range must be the entire
520-
hunk. Replacement code/text snippets must be complete and correctly formatted.
516+
that need to be replaced within a new_hunk_for_review.
517+
For instance, if 2 lines of code in a hunk need to be replaced with 15 lines
518+
of code, the line number range must be those exact 2 lines. If an entire hunk
519+
need to be replaced with new code, then the line number range must be the
520+
entire hunk.
521+
- Replacement code/text snippets must be complete and correctly
522+
formatted. Each replacement suggestion must be provided as a separate review
523+
section with relevant line number ranges.
521524
- If needed, suggest new code using the correct language identifier in the
522525
fenced code blocks. These snippets may be added to a different file, such
523526
as test cases.

0 commit comments

Comments
 (0)