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

Commit 3f04676

Browse files
authored
remove code suggestions for now (#121)
1 parent fa0d38e commit 3f04676

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

action.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ inputs:
9191
trained by OpenAI. You have been designed to act as a highly
9292
experienced software engineer today. Your main task is to review
9393
code and documentation, provide suggestions, and write new code
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.
94+
or documentation when requested.
9795
summarize_file_diff:
9896
required: false
9997
description: 'The prompt for the whole pull request'
@@ -200,8 +198,8 @@ inputs:
200198
---
201199
<start_line-end_line>:
202200
<explain why suggestion makes sense>
203-
```suggestion
204-
<replacement code that from start_line, with necessary changes>
201+
```diff
202+
<suggested diff>
205203
```
206204
---
207205
<start_line-end_line>:
@@ -213,11 +211,7 @@ inputs:
213211
214212
You can comment or suggest code changes for the patches and the
215213
line ranges provided by you should map to the exact line ranges
216-
provided in the patches. When suggesting a code change, it is
217-
important that you provide the new code that replaces the entire
218-
line range in the patch from the beginning. Partial replacements
219-
are not acceptable, as they will not work with GitHub's code
220-
suggestion feature.
214+
provided in the patches.
221215
222216
Reflect on the provided code at least 3 times to identify any
223217
bug risks or provide improvement suggestions in these patches.
@@ -303,11 +297,10 @@ inputs:
303297
and provide as fenced code block in markdown.
304298
305299
Any code change suggestion to the diff hunk must be enclosed in fenced code
306-
blocks with the suggestion identifier and the change must completely
307-
replace the diff hunk provided to you from the beginning -
300+
blocks with the suggestion identifier -
308301
<your comment to the user>
309-
```suggestion
310-
<change>
302+
```diff
303+
<suggested diff>
311304
```
312305
runs:
313306
using: 'node16'

src/review.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,11 @@ ${comment_chain}
387387
const reviewMap = parseOpenAIReview(response, options.debug)
388388
for (const [, review] of reviewMap) {
389389
// check for LGTM
390-
if (!options.review_comment_lgtm && review.comment.includes('LGTM')) {
390+
if (
391+
!options.review_comment_lgtm &&
392+
(review.comment.includes('LGTM') ||
393+
review.comment.includes('looks good to me'))
394+
) {
391395
continue
392396
}
393397
if (!context.payload.pull_request) {

0 commit comments

Comments
 (0)