Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
with:
debug: true
review_comment_lgtm: true
review_comment_lgtm: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 ChatGPT

LGTM!

This patch sets the review_comment_lgtm flag to false, which will prevent the bot from automatically commenting "LGTM" on pull requests. This seems like a reasonable change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 ChatGPT

Patch review for .github/workflows/chatgpt-review.yml:

The change made in this patch is to set the review_comment_lgtm flag to false. This flag controls whether or not a "LGTM" comment is automatically posted when a pull request is reviewed.

This change seems reasonable, as it may be more appropriate to manually post an "LGTM" comment after reviewing the code, rather than having it done automatically. However, it would be good to confirm with the team if this is the desired behavior before merging the pull request.

Overall, this patch seems fine to me.

LGTM!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 ChatGPT

The change in .github/workflows/chatgpt-review.yml seems fine. The review_comment_lgtm flag is set to false, which means that the bot will not automatically add an LGTM comment on the pull request. This can be useful if the team wants to encourage more thorough reviews and discussions before approving a pull request.

LGTM!

3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ChatGPT based PR reviewer and summarizer

![AI](./docs/images/ai.png)

## Overview

This [ChatGPT](https://platform.openai.com/docs/guides/chat) based GitHub Action provides a summary, release notes and review of pull requests. The prompts have been tuned for concise response. To prevent excessive notifications, this action can be configured to skip adding review comments when the changes look good for the most part.
Expand Down Expand Up @@ -173,7 +175,6 @@ Set `debug: true` in the workflow file to enable debug mode, which will show the

### Special Thanks

This GitHub Action is based on
This GitHub Action is based on
[ChatGPT Action](https://github.com/unsafecoerce/chatgpt-pr-reviewer)
by [Tao He](https://github.com/sighingnow).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 ChatGPT

LGTM! The removal of the extra line improves readability.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 ChatGPT

LGTM! The removal of the line about special thanks seems fine as it doesn't seem to affect the functionality of the action.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 ChatGPT

LGTM! The developer has removed a line that mentions the base of the GitHub Action, which is not necessary.


121 changes: 63 additions & 58 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ inputs:
temperature:
required: false
description: 'Temperature for ChatGPT model'
default: '0.1'
default: '0.0'
review_comment_lgtm:
required: false
description: 'Leave comments even if the patch is LGTM'
default: 'false'
path_filters:
required: false
description: |
Expand All @@ -22,6 +26,7 @@ inputs:
- https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore
- https://github.com/isaacs/minimatch
default: |
!dist/**
!**/*.pb.go
!**/*.lock
!**/*.yaml
Expand Down Expand Up @@ -51,63 +56,6 @@ inputs:
description: |
The URL of the chatgpt reverse proxy, see also https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy
default: https://chat.duti.tech/api/conversation
review_comment_lgtm:
required: false
description: 'Leave comments even if the patch is LGTM'
default: false
review_beginning:
required: false
description: 'The beginning prompt of a code review dialog'
default: |
$system_message

I will be providing you some files and entire diff to help you build
context, in case the content is not too large. Then I will be sending you each patch
from the diff for review.

I have a pull request with title "$title" and the description is as follows,

> $description.

Reply "OK" to confirm that you are ready for further instructions.
review_file:
required: false
description: 'The prompt for each file'
default: |
Providing `$filename` content as context. Please use this context when reviewing patches.

```
$file_content
```
review_file_diff:
required: false
description: 'The prompt for each file diff'
default: |
Providing entire diff for `$filename` as context. Please use this context when reviewing patches.

```diff
$file_diff
```
review_patch_begin:
required: false
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
suggestion. If the patch looks good and acceptable, please reply "LGTM!" with a short
comment within 30 words.

Your responses will be recorded as review comments on the pull request. Markdown format is
preferred for your responses. Reply "OK" to confirm.
review_patch:
required: false
description: 'The prompt for each chunks/patches'
default: |
$filename

```diff
$patch
```
summarize_beginning:
required: false
description: 'The prompt for the whole pull request'
Expand Down Expand Up @@ -166,6 +114,63 @@ inputs:
e.g. "New Feature: An integrations page was added to the UI". Your response should be as
concise as possible (50-100 words), without additional commentary as this response will be
used as is in our release notes.
review_beginning:
required: false
description: 'The beginning prompt of a code review dialog'
default: |
$system_message

I will be providing you some files and entire diff to help you build
context, in case the content is not too large. Then I will be sending you each patch
from the diff for review.

I have a pull request with title "$title" and the description is as follows,

> $description.

ChatGPT generated summary is as follows,

> $summary

Reply "OK" to confirm that you are ready for further instructions.
review_file:
required: false
description: 'The prompt for each file'
default: |
Providing `$filename` content as context. Please use this context when reviewing patches.

```
$file_content
```
review_file_diff:
required: false
description: 'The prompt for each file diff'
default: |
Providing entire diff for `$filename` as context. Please use this context when reviewing patches.

```diff
$file_diff
```
review_patch_begin:
required: false
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
suggestion. If the patch looks good and acceptable, please reply "LGTM!" with a short
comment within 30 words.

Your responses will be recorded as review comments on the pull request. Markdown format is
preferred for your responses. Reply "OK" to confirm.
review_patch:
required: false
description: 'The prompt for each chunks/patches'
default: |
$filename

```diff
$patch
```
runs:
using: 'node16'
main: 'dist/index.js'
155 changes: 85 additions & 70 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/images/ai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading