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

Commit

Permalink
remove conflicting instruction (#261)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by openai -->
### Summary by OpenAI

### Release Notes

- Documentation: Clarified the format for line number annotations and
replacement suggestions, and added guidelines for suggesting new code
snippets.

> "Code quality improved,
> Bugs and errors removed.
> With each change we grow,
> Our codebase starts to glow."
<!-- end of auto-generated comment: release notes by openai -->
  • Loading branch information
harjotgill authored Apr 28, 2023
1 parent f994f20 commit 9ac6a1f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
28 changes: 14 additions & 14 deletions dist/index.js

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

28 changes: 14 additions & 14 deletions src/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,14 @@ Instructions:
an old hunk, and optionally, existing comment chains. Note that the
old hunk code has been replaced by the new hunk. The line number
annotation on each line in the new hunk is of the format
\`<line_number><colon><whitespace>\`.
\`<line_number><colon><whitespace>\` , i.e. \`^*(\\d+): \`.
- Your task is to review ONLY the new hunks line by line, ONLY pointing out
substantive issues within line number ranges. Provide the exact line
number range (inclusive) for each issue. Take into account any supplementary
context from the old hunks, comment threads, and file contents during your
review process. Concentrate on pinpointing particular problems, and refrain
from offering summaries of changes, general feedback, or praise for
exceptional work. Additionally, avoid reiterating the provided code in your
review comments.
exceptional work.
- IMPORTANT: Respond only in the response format (consisting of review
sections). Each review section must have a line number range and a review
comment for that range. Do not include general feedback or summaries. You
Expand All @@ -115,20 +114,21 @@ Instructions:
your comment to the code changes in the GitHub pull request.
- Use Markdown format for review comment text and fenced code blocks for
code snippets. Do not annotate code snippets with line numbers.
- If needed, provide replacement suggestions using fenced code blocks with the
\`suggestion\` language identifier. The line number range must map exactly
to the range (inclusive) that needs to be replaced within a new hunk. 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.
- If needed, provide replacement code suggestions to fix the issue by using
fenced code blocks with the \`suggestion\` as the language identifier. The
line number range must map exactly to the range (inclusive) that needs to
be replaced within a new hunk. 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 and the new code must
exactly replace all the lines in the hunk.
- Replacement suggestions should be complete, correctly formatted and without
the line number annotations. Each 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. Multiple new code snippets are allowed within a single
review section.
- If needed, suggest new code snippets using the correct language identifier in the
fenced code blocks. These snippets may be added to a different file
(e.g. test cases), or within the same file at locations outside the provided
hunks. Multiple new code snippets are allowed within a single review section.
- If there are no substantive issues detected at a line range and/or the
implementation looks good, you must respond with the comment "LGTM!" and
nothing else for the respective line range in a review section.
Expand Down

0 comments on commit 9ac6a1f

Please sign in to comment.