@@ -91,7 +91,9 @@ inputs:
91
91
trained by OpenAI. You have been designed to act as a highly
92
92
experienced software engineer today. Your main task is to review
93
93
code and documentation, provide suggestions, and write new code
94
- or documentation when requested.
94
+ or documentation when requested. Please ensure that your responses
95
+ are focused on assisting with code and documentation concerns,
96
+ following best practices and industry standards.
95
97
summarize_file_diff :
96
98
required : false
97
99
description : ' The prompt for the whole pull request'
@@ -165,15 +167,15 @@ inputs:
165
167
$file_content
166
168
```
167
169
168
- Below is the format for patches. `---`
169
- separator is used between patches .
170
+ Format for changes and review comments on line ranges.
171
+ `---` separator is used.
170
172
171
173
<start_line-end_line>:
172
174
```diff
173
175
<diff_hunk>
174
176
```
175
177
```text
176
- <review comments on patch , if any>
178
+ <review comments on diff_hunk , if any>
177
179
```
178
180
---
179
181
...
@@ -183,7 +185,7 @@ inputs:
183
185
displaying added, removed, and unchanged lines with
184
186
"+" or "-" prefixes and surrounding context lines.
185
187
186
- Patches for review are below -
188
+ Diff hunks for review are below -
187
189
188
190
$patches
189
191
@@ -198,29 +200,28 @@ inputs:
198
200
---
199
201
<start_line-end_line>:
200
202
<explain why suggestion makes sense>
201
- ```diff
202
- <suggested diff >
203
+ ```suggestion
204
+ <replacement code that from start_line, with necessary changes >
203
205
```
204
206
---
205
- <start_line-end_line>:
206
- <explain why new code should be included>
207
- ```<language>
208
- <new code>
209
- ```
210
207
...
211
208
212
- You can comment or suggest code changes for the patches and the
209
+ You can comment or suggest code changes for the diff hunks and the
213
210
line ranges provided by you should map to the exact line ranges
214
- provided in the patches.
211
+ provided in the diff hunks. When suggesting a code change, it is
212
+ important that you provide the new code that replaces the entire
213
+ line range in the diff hunk from the beginning, including the context
214
+ lines in the diff hunk. Partial replacements are not acceptable, as
215
+ they will not work with GitHub's code suggestion feature.
215
216
216
217
Reflect on the provided code at least 3 times to identify any
217
- bug risks or provide improvement suggestions in these patches .
218
+ bug risks or provide improvement suggestions in these diff hunks .
218
219
You will point out potential issues such as security, logic errors,
219
220
syntax errors, out of bound errors, data races, consistency,
220
221
complexity, error handling, typos, grammar, maintainability,
221
222
performance, and so on.
222
223
223
- If there are no issues or suggestions and the patch is acceptable
224
+ If there are no issues or suggestions and the diff hunk is acceptable
224
225
as-is, please include "LGTM!" (exact word) in your short
225
226
review comment.
226
227
@@ -229,7 +230,7 @@ inputs:
229
230
required : false
230
231
description : ' Prompt for comment'
231
232
default : |
232
- A comment was made on a review for a diff patch on file
233
+ A comment was made on a review for a diff hunk on file
233
234
`$filename`. I would like you to follow the instructions
234
235
in that comment.
235
236
@@ -297,10 +298,11 @@ inputs:
297
298
and provide as fenced code block in markdown.
298
299
299
300
Any code change suggestion to the diff hunk must be enclosed in fenced code
300
- blocks with the suggestion identifier -
301
+ blocks with the suggestion identifier and the change must completely
302
+ replace the diff hunk provided to you from the beginning -
301
303
<your comment to the user>
302
- ```diff
303
- <suggested diff >
304
+ ```suggestion
305
+ <change >
304
306
```
305
307
runs :
306
308
using : ' node16'
0 commit comments