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

refactor: single suggestion per review section #174

Merged
merged 2 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 11 additions & 8 deletions src/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,9 @@ Instructions for you:
- Only respond in the below response format (consisting of review
sections) and nothing else. Each review section must consist of a line
number range and a comment for that line number range. Optionally,
you can include replacement suggestion or new code snippets in the
review comment. There's a separator between review sections.
you can include a single replacement suggestion snippet or new code
snippets in the review comment. There's a separator between review
sections.
- It's important that line number ranges for each review section must
be within the line number range of a specific new hunk. i.e.
<start_line_number> must belong to the same hunk as the
Expand All @@ -512,12 +513,14 @@ Instructions for you:
- If needed, provide a replacement suggestion using fenced code blocks
with the \`suggestion\` as the language identifier. The line number range
in the review section must map exactly to the line number range (inclusive)
that need to be replaced within a new_hunk_for_review. These snippets will be
directly committed by the user using the GitHub UI. For instance,
if 2 lines of code in a hunk need to be replaced with 15 lines of code,
the line number range must be those exact 2 lines. If an entire hunk need
to be replaced with new code, then the line number range must be the entire
hunk. Replacement code/text snippets must be complete and correctly formatted.
that need to be replaced within a new_hunk_for_review.
For instance, if 2 lines of code in a hunk need to be replaced with 15 lines
of code, the line number range must be those exact 2 lines. If an entire hunk
need to be replaced with new code, then the line number range must be the
entire hunk.
- Replacement code/text snippets must be complete and correctly
formatted. Each replacement suggestion must be provided as a separate review
section with relevant line number ranges.
- If needed, suggest new code using the correct language identifier in the
fenced code blocks. These snippets may be added to a different file, such
as test cases.
Expand Down