@@ -98,9 +98,7 @@ inputs:
98
98
required : false
99
99
description : ' The prompt for the whole pull request'
100
100
default : |
101
- In this session, we will summarize a pull request and a diff alltogether.
102
-
103
- The pull request has the title "$title" and the following description:
101
+ GitHub pull request has the title "$title" and the following description:
104
102
105
103
```
106
104
$description
@@ -151,7 +149,7 @@ inputs:
151
149
required : false
152
150
description : ' The prompt for each file'
153
151
default : |
154
- The pull request has the title "$title" and the following description:
152
+ GitHub pull request has the title "$title" and the following description:
155
153
156
154
```
157
155
$description
@@ -172,29 +170,51 @@ inputs:
172
170
Below is the format for diff patches. `---`
173
171
separator is used between patches.
174
172
175
- <line_number>:
173
+ <start_line-end_line>:
174
+ ```diff
175
+ <diff_hunk>
176
+ ```
176
177
```text
177
178
<review comments on patch, if any>
178
179
```
179
- ```diff
180
- <patch>
181
- ```
182
180
---
183
181
...
184
182
185
183
Patches for review -
186
184
187
185
$patches
188
186
189
- Your review for each patch should be the following format
190
- with `---` separator between review comments. Make sure
191
- to use the line numbers exactly as provided above:
187
+ Your review must consist of comments in the following format
188
+ with `---` separator between review comments. Any other
189
+ commentary outside of this format will be ignored and will not
190
+ be read by the parser. Your comments will be added as multi-line
191
+ review comments in the GitHub pull request.
192
192
193
- <line_number>:
194
- <review>
193
+ <start_line-end_line>:
194
+ <review comment>
195
+ ---
196
+ <start_line-end_line>:
197
+ <explain why suggestion makes sense>
198
+ ```suggestion
199
+ <new code>
200
+ ```
195
201
---
196
202
...
197
203
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
+ ```
217
+
198
218
Reflect on the provided code at least 3 times to identify any bug risks
199
219
or provide improvement suggestions in these patches.
200
220
You will point out potential issues such as security, logic errors,
@@ -206,8 +226,7 @@ inputs:
206
226
as-is, please include "LGTM!" (exact word) in your short
207
227
review comment.
208
228
209
- Your responses will be recorded as review comments on the
210
- pull request. Markdown format is preferred for your responses.
229
+ Markdown format is preferred for your responses.
211
230
comment :
212
231
required : false
213
232
description : ' Prompt for comment'
@@ -265,10 +284,6 @@ inputs:
265
284
Please reply directly to the new comment (instead of suggesting
266
285
a reply) and your reply will be posted as-is.
267
286
268
- If the comment contains instructions/requests for you, please comply.
269
- For example, if the comment is asking you to generate documentation
270
- comments on the code, in your reply please generate the required code.
271
-
272
287
In your reply, please make sure to begin the reply by tagging the user
273
288
with "@user".
274
289
@@ -277,6 +292,17 @@ inputs:
277
292
```
278
293
$comment
279
294
```
295
+
296
+ If the comment contains instructions/requests for you, please comply.
297
+ 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 -
302
+ <your comment to the user>
303
+ ```suggestion
304
+ <change>
305
+ ```
280
306
runs :
281
307
using : ' node16'
282
308
main : ' dist/index.js'
0 commit comments