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

Commit 86f3a37

Browse files
authored
ask for properly formatted suggestions (#139)
1 parent 89e3721 commit 86f3a37

File tree

1 file changed

+41
-40
lines changed

1 file changed

+41
-40
lines changed

action.yml

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ inputs:
9494
required: false
9595
description: 'The prompt for the whole pull request'
9696
default: |
97-
GitHub pull request has the title -
97+
GitHub pull request title -
9898
`$title`
9999
100100
Here is the description -
@@ -153,7 +153,7 @@ inputs:
153153
required: false
154154
description: 'The prompt for each file'
155155
default: |
156-
GitHub pull request has the title -
156+
GitHub pull request title -
157157
`$title`
158158
159159
Here is the description -
@@ -172,59 +172,60 @@ inputs:
172172
```
173173
174174
Format for changes and review comments (if any) -
175-
```new_hunk
176-
<new code with line numbers>
177-
```
178175
179-
```old_hunk
180-
<old code>
181-
```
176+
```new_hunk
177+
<new code with line numbers>
178+
```
182179
183-
```comment_chain
184-
<existing review comments>
185-
```
186-
---
187-
...
180+
```old_hunk
181+
<old code>
182+
```
183+
184+
```comment_chain
185+
<existing review comments>
186+
```
187+
---
188+
...
188189
189190
Changes for review -
190191
$patches
191192
192193
Your review must consist of comments in the below format
193194
with a separator between review comments. The format consists of
194195
line number range and review comment applicable for that line
195-
number range. You can make multiple comments for each hunk.
196-
Any other commentary outside of this format will be ignored
197-
and will not be read by the parser. It's important that line number
196+
number range. Any other commentary outside of this format will be
197+
ignored and will not be read by the parser. You can make multiple
198+
comments for each hunk. It's important that line number
198199
ranges for each review must be within line number range of new_hunks.
199200
Don't echo back the code provided to you as the
200201
line number range is sufficient to map your comment to the relevant code
201-
section in GitHub.
202-
203-
Markdown format is preferred for text. Fenced code blocks should be
204-
used for complete code suggestions that replace code at those
205-
exact line number ranges -
206-
207-
<start_line_number>-<end_line_number>:
208-
<review markdown>
209-
```suggestion
210-
<replacement of code between start_line_number and end_line_number>
211-
```
212-
---
213-
<start_line_number>-<end_line_number>:
214-
<review markdown>
215-
---
216-
...
202+
section in GitHub. Markdown format is preferred for text. Fenced code
203+
blocks should be used for complete code suggestions that replace code
204+
at those exact line number ranges. It's important that the code
205+
suggestions are complete and correctly formatted so that they can be
206+
committed as-is.
207+
208+
<start_line_number>-<end_line_number>:
209+
<review markdown>
210+
```suggestion
211+
<code that replaces everything between start_line_number and end_line_number>
212+
```
213+
---
214+
<start_line_number>-<end_line_number>:
215+
<review markdown>
216+
---
217+
...
217218
218219
Examples -
219220
220-
1-5:
221-
LGTM!
222-
---
223-
6-6:
224-
```suggestion
225-
print "Hello!"
226-
```
227-
---
221+
1-5:
222+
LGTM!
223+
---
224+
6-6:
225+
```suggestion
226+
print "Hello!"
227+
```
228+
---
228229
229230
Reflect on the provided code thoroughly and identify substantive
230231
bug risks or provide improvement suggestions in these changes.

0 commit comments

Comments
 (0)