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

Commit 0e0ff9c

Browse files
authored
Prompt updates (#157)
<!-- This is an auto-generated comment: release notes by openai --> ### Summary by OpenAI Release Notes: - New Feature: The review process has been updated to include specific response formats and markdown formatting. - Bug fix: Error handling and token limit checks have been added to prevent issues with large files. - Refactor: Redundant code has been removed for replying to comments. > "Code quality improved, errors handled with care, > Review process updated, easier to share. > Bugs fixed, code refactored, all in one PR, > Celebrate the changes, we've come very far!" <!-- end of auto-generated comment: release notes by openai -->
1 parent 2d0a8d1 commit 0e0ff9c

File tree

4 files changed

+147
-132
lines changed

4 files changed

+147
-132
lines changed

action.yml

Lines changed: 30 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -89,44 +89,41 @@ inputs:
8989
default: |
9090
You are `@openai` (aka `github-actions[bot]`), a language model
9191
trained by OpenAI. Your purpose is to act as a highly experienced
92-
software engineer and provide a thorough review of the provided code.
93-
94-
Focus on key areas such as -
95-
- Security
96-
- Logic
97-
- Syntax
98-
- Performance
99-
- Out of bounds errors
100-
- Data races
101-
- Consistency
102-
- Complexity
103-
- Error handling
104-
- Maintainability
105-
- Code reuse
106-
- Refactoring opportunities
107-
108-
In general, refrain from making comments on minor code style issues or
109-
compliments unless explicitly requested. This helps to reduce noise in
110-
the code review process and keep the focus on substantive issues that
111-
can improve the quality of the code.
92+
software engineer and provide a thorough review of the code hunks
93+
and suggest code snippets to improve key areas such as -
94+
- Logic
95+
- Security
96+
- Performance
97+
- Data races
98+
- Consistency
99+
- Error handling
100+
- Maintainability
101+
- Code reuse
102+
- Complexity
103+
- Optimization
104+
105+
In general, refrain from making noisy comments such as on minor
106+
code style issues, compliments, etc. unless explicitly requested and
107+
keep the focus on substantive issues that can improve the quality
108+
of the code.
112109
summarize_file_diff:
113110
required: false
114111
description: 'The prompt for file'
115112
default: |
116113
GitHub pull request title -
117114
`$title`
118115
119-
Here is the description -
116+
Description -
120117
```
121118
$description
122119
```
123120
124-
Here is the content of file `$filename` -
121+
Content of file `$filename` -
125122
```
126123
$file_content
127124
```
128125
129-
Here is the diff -
126+
Diff -
130127
```diff
131128
$file_diff
132129
```
@@ -172,29 +169,26 @@ inputs:
172169
required: false
173170
description: 'The prompt for each file'
174171
default: |
175-
You will review a pull request.
176-
177172
GitHub pull request title -
178173
`$title`
179174
180-
Here is the description -
175+
Description -
181176
```
182177
$description
183178
```
184179
185-
Here is the OpenAI generated summary -
180+
OpenAI generated summary of overall changes -
186181
```
187182
$summary
188183
```
189184
190-
Here is the content of file `$filename` for context -
185+
Content of file `$filename` for context -
191186
```
192187
$file_content
193188
```
194189
195-
Here are changes for review -
190+
Changes for review -
196191
$patches
197-
198192
comment:
199193
required: false
200194
description: 'Prompt for comment'
@@ -203,30 +197,30 @@ inputs:
203197
diff hunk on file `$filename`. I would like you to follow
204198
the instructions in that comment.
205199
206-
Here is the title -
200+
Pull request title -
207201
`$title`
208202
209-
Here is the description-
203+
Description-
210204
```
211205
$description
212206
```
213207
214-
Here is the OpenAI generated summary -
208+
OpenAI generated summary -
215209
```
216210
$summary
217211
```
218212
219-
Here is the content of file -
213+
Content of file -
220214
```
221215
$file_content
222216
```
223217
224-
Here is the entire diff -
218+
Entire diff -
225219
```diff
226220
$file_diff
227221
```
228222
229-
Here is diff being commented on -
223+
Diff being commented on -
230224
```diff
231225
$diff
232226
```

dist/index.js

Lines changed: 53 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)