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

reset summary conversation for each file #25

Merged
merged 4 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
68 changes: 40 additions & 28 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.

```
$summary
```

I would like you to summarize the diff and add the summary for this file in the table.
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,7 +96,7 @@ 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
the `markdown` format with the following content:
Expand All @@ -101,7 +109,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 +119,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 +129,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 +151,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 +160,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 +171,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