Skip to content

Commit

Permalink
reset summary conversation for each file (coderabbitai#25)
Browse files Browse the repository at this point in the history
no description provided







<!-- This is an auto-generated comment: release notes by openai -->
### Summary by OpenAI

**Release Notes**

- **Chore:** Remove `.prettierrc` file and update `.prettierrc.json` to
include a new property `proseWrap` with a value of `always`.
- **Style:** Formatting changes made to the `src/options.ts` file.
<!-- end of auto-generated comment: release notes by openai -->
  • Loading branch information
harjotgill authored Mar 13, 2023
1 parent 2992d41 commit 05a2b4a
Show file tree
Hide file tree
Showing 6 changed files with 328 additions and 309 deletions.
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

3 changes: 2 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid"
"arrowParens": "avoid",
"proseWrap": "always"
}
77 changes: 48 additions & 29 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: "OpenAI-based PR Reviewer & Summarizer"
description: "OpenAI-based PR Reviewer and Summarizer"
name: 'OpenAI-based PR Reviewer & Summarizer'
description: 'OpenAI-based PR Reviewer and Summarizer'
branding:
icon: "aperture"
color: "orange"
author: "FluxNinja, Inc."
icon: 'aperture'
color: 'orange'
author: 'FluxNinja, Inc.'
inputs:
debug:
required: false
description: "Enable debug mode"
default: "false"
description: 'Enable debug mode'
default: 'false'
temperature:
required: false
description: "Temperature for GPT model"
default: "0.0"
description: 'Temperature for GPT model'
default: '0.0'
review_comment_lgtm:
required: false
description: "Leave comments even if the patch is LGTM"
default: "false"
description: 'Leave comments even if the patch is LGTM'
default: 'false'
path_filters:
required: false
description: |
Expand Down Expand Up @@ -44,7 +44,7 @@ inputs:
!**/vendor/**
system_message:
required: false
description: "System message to be sent to OpenAI"
description: 'System message to be sent to OpenAI'
default: |
You are a very experienced software engineer. You are able to thoroughly review code changes and uncover
issues (if there are any) such as logic errors, syntax errors, out of bound errors, potential data races,
Expand All @@ -53,7 +53,7 @@ inputs:
We will be doing code reviews today.
summarize_beginning:
required: false
description: "The prompt for the whole pull request"
description: 'The prompt for the whole pull request'
default: |
$system_message
Expand All @@ -64,7 +64,9 @@ inputs:
I have a pull request with title "$title" and the description is as follows,
> $description.
```
$description
```
Next, I will be providing you diffs for each file for you to summarize. In every response,
you will update the high-level summary of the entire pull request, the table for each file's
Expand All @@ -74,11 +76,17 @@ inputs:
Reply "OK" to confirm that you are ready to receive the diffs for summarization.
summarize_file_diff:
required: false
description: "The prompt for each file diff"
description: 'The prompt for each file diff'
default: |
Providing diff for `$filename`.
Summary generated by you for other files, is as follows and you can use
this summary as a basis for your response.
I would like you to summarize the diff and add the summary for this file in the table.
```
$summary
```
I am providing diff for `$filename` below. I would like you to summarize the diff and add the summary
for this file in the table.
In response, please provide the updated high-level summary, the summary table of the files
we have summarized so far and your overall feedback to the developer.
Expand All @@ -88,9 +96,16 @@ inputs:
```
summarize:
required: false
description: "The prompt for final summarization response"
description: 'The prompt for final summarization response'
default: |
This is the end of summarization session. Please provide the final response as follows in
This is the end of summarization session. Below is the summary you have generated so far in our previous
conversations. Please use this as a basis for your final response.
```
$summary
```
Please provide the final response as follows in
the `markdown` format with the following content:
- Thank the user for letting you participate in the code review.
- High-level summary (focus on the purpose and intent within 80 words)
Expand All @@ -101,7 +116,7 @@ inputs:
request.
summarize_release_notes:
required: false
description: "The prompt for generating release notes"
description: 'The prompt for generating release notes'
default: |
Next, release notes in `markdown` format for this pull request that focuses on the purpose
of this PR. If needed, you can classify the changes as "New Feature", "Bug fix",
Expand All @@ -111,7 +126,7 @@ inputs:
used as is in our release notes.
review_beginning:
required: false
description: "The beginning prompt of a code review dialog"
description: 'The beginning prompt of a code review dialog'
default: |
$system_message
Expand All @@ -121,16 +136,20 @@ inputs:
I have a pull request with title "$title" and the description is as follows,
> $description.
```
$description
```
OpenAI generated summary is as follows,
> $summary
```
$summary
```
Reply "OK" to confirm that you are ready for further instructions.
review_file:
required: false
description: "The prompt for each file"
description: 'The prompt for each file'
default: |
Providing `$filename` content as context. Please use this context when reviewing patches.
Expand All @@ -139,7 +158,7 @@ inputs:
```
review_file_diff:
required: false
description: "The prompt for each file diff"
description: 'The prompt for each file diff'
default: |
Providing entire diff for `$filename` as context. Please use this context when reviewing patches.
Expand All @@ -148,7 +167,7 @@ inputs:
```
review_patch_begin:
required: false
description: "The prompt for each file diff"
description: 'The prompt for each file diff'
default: |
Next, I will send you a series of patches, each of them consists of a diff snippet, and you
need to do a brief code review for every patch, and tell me any bug risk or improvement
Expand All @@ -159,13 +178,13 @@ inputs:
preferred for your responses. Reply "OK" to confirm.
review_patch:
required: false
description: "The prompt for each chunks/patches"
description: 'The prompt for each chunks/patches'
default: |
$filename
```diff
$patch
```
runs:
using: "node16"
main: "dist/index.js"
using: 'node16'
main: 'dist/index.js'
Loading

0 comments on commit 05a2b4a

Please sign in to comment.