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

Commit 89eb6d3

Browse files
authored
try multi-line comments (#119)
1 parent 930a3e5 commit 89eb6d3

File tree

1 file changed

+29
-25
lines changed

1 file changed

+29
-25
lines changed

action.yml

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ inputs:
167167
$file_content
168168
```
169169
170-
Below is the format for diff patches. `---`
171-
separator is used between patches.
170+
Below is the format for patches. `---`
171+
separator is used between patches.
172172
173173
<start_line-end_line>:
174174
```diff
@@ -180,12 +180,17 @@ inputs:
180180
---
181181
...
182182
183-
Patches for review -
183+
The <diff_hunk> is in the unidiff format which
184+
represent the differences between two text files,
185+
displaying added, removed, and unchanged lines with
186+
"+" or "-" prefixes and surrounding context lines.
187+
188+
Patches for review are below -
184189
185190
$patches
186191
187-
Your review must consist of comments in the following format
188-
with `---` separator between review comments. Any other
192+
Your review must consist of comments in the below format
193+
with a separator between review comments. Any other
189194
commentary outside of this format will be ignored and will not
190195
be read by the parser. Your comments will be added as multi-line
191196
review comments in the GitHub pull request.
@@ -196,27 +201,24 @@ inputs:
196201
<start_line-end_line>:
197202
<explain why suggestion makes sense>
198203
```suggestion
199-
<new code>
204+
<replacement code>
200205
```
201206
---
207+
<start_line-end_line>:
208+
<explain why new code should be included>
209+
```<language>
210+
<new code>
211+
```
202212
...
203213
204-
You can comment or suggest code changes for any number
205-
of (sub) line ranges within the line ranges
206-
(start_line and end_line) as long as your line ranges are
207-
within the line ranges in the patches.
208-
When suggesting code changes, the line ranges provided by you should
209-
map to exact line ranges that you wish to replace in the code
210-
with your new code suggestion. For example, if you are suggesting
211-
to replace 2 lines in code then the example comment could be -
212-
100-101:
213-
```suggestion
214-
print "Hello world"
215-
end
216-
```
214+
You can comment or suggest code changes for the patches and the
215+
line ranges provided by you should map to the exact line ranges
216+
provided in the patches. When suggesting a code change, please
217+
provide the new code that replaces the entire patch from the
218+
beginning.
217219
218-
Reflect on the provided code at least 3 times to identify any bug risks
219-
or provide improvement suggestions in these patches.
220+
Reflect on the provided code at least 3 times to identify any
221+
bug risks or provide improvement suggestions in these patches.
220222
You will point out potential issues such as security, logic errors,
221223
syntax errors, out of bound errors, data races, consistency,
222224
complexity, error handling, typos, grammar, maintainability,
@@ -295,10 +297,12 @@ inputs:
295297
296298
If the comment contains instructions/requests for you, please comply.
297299
For example, if the comment is asking you to generate documentation
298-
comments on the code, in your reply please generate the required code.
299-
Any code change suggestion in the response must be enclosed in fenced code
300-
blocks with the suggestion identifier and must be in the line range
301-
of diff hunk provided to you -
300+
comments on the code, in your reply please generate the required code
301+
and provide as fenced code block in markdown.
302+
303+
Any code change suggestion to the diff hunk must be enclosed in fenced code
304+
blocks with the suggestion identifier and the change must completely
305+
replace the diff hunk provided to you from the beginning -
302306
<your comment to the user>
303307
```suggestion
304308
<change>

0 commit comments

Comments
 (0)