@@ -53,9 +53,13 @@ inputs:
53
53
!**/_gen/**
54
54
!**/generated/**
55
55
!**/vendor/**
56
- openai_model :
56
+ openai_summary_model :
57
57
required : false
58
- description : ' Model to use'
58
+ description : ' Model to use for summarization'
59
+ default : ' gpt-3.5-turbo'
60
+ openai_review_model :
61
+ required : false
62
+ description : ' Model to use for review'
59
63
default : ' gpt-3.5-turbo'
60
64
openai_model_temperature :
61
65
required : false
@@ -78,37 +82,26 @@ inputs:
78
82
required : false
79
83
description : ' System message to be sent to OpenAI'
80
84
default : |
81
- You are `@openai` (aka `github-actions[bot]`), a highly
82
- experienced software engineer with a strong ability to review
83
- code changes thoroughly.
84
-
85
- Your role today is to conduct code and documentation reviews, and
86
- generate code and documentation if asked to do so. You will point
87
- out potential issues such as security (e.g. XSS), logic errors,
88
- syntax errors, out of bound errors, data races, livelocks, starvation,
89
- suspension, order violation, atomicity violation, consistency,
90
- complexity, error handling, typos, grammar, and more.
91
- summarize_beginning :
85
+ You are `@openai` (aka `github-actions[bot]`), a language model
86
+ trained by OpenAI. You have been designed to act as a highly
87
+ experienced software engineer today. Your main task is to review
88
+ code and documentation, provide suggestions, and write new code
89
+ or documentation when requested. Please ensure that your responses
90
+ are focused on assisting with code and documentation concerns,
91
+ following best practices and industry standards.
92
+ summarize_file_diff :
92
93
required : false
93
94
description : ' The prompt for the whole pull request'
94
95
default : |
95
- $system_message
96
-
97
- In this session, we will summarize a pull request.
96
+ In this session, we will summarize a pull request and a diff alltogether.
98
97
99
98
The pull request has the title "$title" and the following description:
100
99
101
100
```
102
101
$description
103
102
```
104
-
105
- Reply "OK" to confirm that you are ready.
106
- summarize_file_diff :
107
- required : false
108
- description : ' The prompt for each file diff'
109
- default : |
110
103
I am providing diff for `$filename` below. I would like you to summarize
111
- the diff within 30 words.
104
+ the diff within 50 words.
112
105
113
106
```diff
114
107
$file_diff
@@ -148,16 +141,10 @@ inputs:
148
141
Below the release notes, generate a short, celebratory poem about the
149
142
changes in this PR and add this poem as a quote (> symbol). You can
150
143
use emojis in the poem, where they are relevant.
151
- review_beginning :
144
+ review_file_diff :
152
145
required : false
153
- description : ' The beginning prompt of a code review dialog '
146
+ description : ' The prompt for each file '
154
147
default : |
155
- $system_message
156
-
157
- I will provide you with some files and the entire diff to help you build
158
- context, unless the content is too large. Then, I will send you each patch
159
- from the diff for review.
160
-
161
148
The pull request has the title "$title" and the following description:
162
149
163
150
```
@@ -170,68 +157,55 @@ inputs:
170
157
$summary
171
158
```
172
159
173
- Reply "OK" to confirm.
174
- review_file :
175
- required : false
176
- description : ' The prompt for each file'
177
- default : |
178
- Here is the content of `$filename` for context. Please use this context
179
- when reviewing patches.
160
+ Content of `$filename` is follows.
180
161
181
162
```
182
163
$file_content
183
164
```
184
165
185
- Reply "LGTM!" if the existing code in this file looks correct. If there
186
- are serious issues in the existing code please let me know and I will
187
- add your comment on the pull request for this file.
188
- review_file_diff :
189
- required : false
190
- description : ' The prompt for each file diff'
191
- default : |
192
- Here is the entire diff for `$filename` for context. Please use this context
193
- when reviewing patches.
166
+ Below is the format for diff patches. `---`
167
+ separator is used between patches.
194
168
169
+ <line_number>:
170
+ ```text
171
+ <review comments on patch, if any>
172
+ ```
195
173
```diff
196
- $file_diff
174
+ <patch>
197
175
```
176
+ ---
177
+ ...
198
178
199
- Reply "OK" to confirm.
200
- review_patch_begin :
201
- required : false
202
- description : ' The prompt for each file diff'
203
- default : |
204
- Next, I will send you a series of patches. Each patch consists of a diff snippet,
205
- and your task is to review every patch. Identify any bug risks or provide
206
- improvement suggestions. Otherwise, if the patch is acceptable, please reply
207
- "LGTM!" with a short comment.
179
+ Patches for review -
208
180
209
- Your responses will be recorded as review comments on the pull request.
210
- Markdown format is preferred for your responses.
181
+ $patches
211
182
212
- Reply "OK" to confirm.
213
- review_patch :
214
- required : false
215
- description : ' The prompt for each chunks/patches'
216
- default : |
217
- $filename
183
+ Your review for each patch should be the following format
184
+ with `---` separator between review comments. Make sure
185
+ to use the line numbers exactly as provided above:
218
186
219
- Existing comments on the patch, though some of them may be outdated.
220
- Please use them as additional context.
221
- ```
222
- $comment_chain
223
- ```
187
+ <line_number>:
188
+ <review>
189
+ ---
190
+ ...
224
191
225
- Diff for review:
226
- ```diff
227
- $patch
228
- ```
229
- comment_beginning :
192
+ Reflect on the provided code at least 3 times to identify any bug risks
193
+ or provide improvement suggestions in these patches.
194
+ You will point out potential issues such as security, logic errors,
195
+ syntax errors, out of bound errors, data races, consistency,
196
+ complexity, error handling, typos, grammar, code style, maintainability,
197
+ performance, and so on.
198
+
199
+ If there are no issues or suggestions and the patch is acceptable
200
+ as-is, please include "LGTM!" (exact word) in your short
201
+ review comment.
202
+
203
+ Your responses will be recorded as review comments on the
204
+ pull request. Markdown format is preferred for your responses.
205
+ comment :
230
206
required : false
231
207
description : ' Prompt for comment'
232
208
default : |
233
- $system_message
234
-
235
209
A comment was made on a review for a diff patch on file
236
210
`$filename`. I would like you to follow the instructions
237
211
in that comment.
@@ -252,33 +226,18 @@ inputs:
252
226
$summary
253
227
```
254
228
255
- Reply "OK" to confirm.
256
- comment_file :
257
- required : false
258
- description : ' Prompt for file'
259
- default : |
260
- Here is the content of `$filename` for context.
229
+ Here is the content of file.
261
230
262
231
```
263
232
$file_content
264
233
```
265
234
266
- Reply "OK" to confirm.
267
- comment_file_diff :
268
- required : false
269
- description : ' Prompt for file diff'
270
- default : |
271
- Here is the entire diff for `$filename` for context.
235
+ Here is the entire diff.
272
236
273
237
```diff
274
238
$file_diff
275
239
```
276
240
277
- Reply "OK" to confirm.
278
- comment :
279
- required : false
280
- description : ' Prompt for comment'
281
- default : |
282
241
I would like you to follow the instructions in the new
283
242
comment made on a conversation chain on a code review diff.
284
243
0 commit comments