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

Commit 9dab0f9

Browse files
authored
Rename repo - ChatGPT -> OpenAI (#20)
<!-- This is an auto-generated comment: release notes by openai --> ### Summary by OpenAI **Release Notes:** - Refactor: Updated import statements, added semicolons and removed unnecessary whitespace in `src/options.ts`. Renamed repository from ChatGPT to OpenAI and updated references to ChatGPT to OpenAI in `README.md` and `src/bot.ts`. Added polyfill for `fetch` and related classes in `src/fetch-polyfill.js` and removed previous implementation of polyfill in `src/fetch-polyfill.ts`. Replaced references to `chatgpt` with `openai` in `src/main.ts` and `src/bot.ts`. <!-- end of auto-generated comment: release notes by openai -->
1 parent e230035 commit 9dab0f9

15 files changed

+521
-527
lines changed

README.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# ChatGPT-based PR reviewer and summarizer
1+
# OpenAI GPT based PR reviewer and summarizer
22

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

55
## Overview
66

7-
This [ChatGPT](https://platform.openai.com/docs/guides/chat) based GitHub Action
8-
provides a summary, release notes and review of pull requests. The prompts have
9-
been tuned for a concise response. To prevent excessive notifications, this
10-
action can be configured to skip adding review comments when the changes look
11-
good for the most part.
7+
This [OpenAI Chat](https://platform.openai.com/docs/guides/chat) based GitHub
8+
Action provides a summary, release notes and review of pull requests. The
9+
prompts have been tuned for a concise response. To prevent excessive
10+
notifications, this action can be configured to skip adding review comments when
11+
the changes look good for the most part.
1212

1313
NOTES:
1414

@@ -18,14 +18,14 @@ NOTES:
1818
- OpenAI's API is used instead of ChatGPT session on their portal. OpenAI API
1919
has a
2020
[more conservative data usage policy](https://openai.com/policies/api-data-usage-policies)
21-
compared to ChatGPT.
21+
compared to their ChatGPT offering.
2222

2323
### Features
2424

2525
- Code review your pull requests
2626

2727
```yaml
28-
- uses: fluxninja/chatgpt-pr-reviewer@main
28+
- uses: fluxninja/openai-pr-reviewer@main
2929
env:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3131
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -55,7 +55,7 @@ jobs:
5555
repository: ${{github.event.pull_request.head.repo.full_name}}
5656
ref: ${{github.event.pull_request.head.ref}}
5757
submodules: false
58-
- uses: fluxninja/chatgpt-pr-reviewer@main
58+
- uses: fluxninja/openai-pr-reviewer@main
5959
env:
6060
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6161
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -66,11 +66,11 @@ jobs:
6666
6767
### Screenshots
6868
69-
![PR Summary](./docs/images/chatgpt-pr-summary.png)
69+
![PR Summary](./docs/images/openai-pr-summary.png)
7070
71-
![PR Release Notes](./docs/images/chatgpt-pr-release-notes.png)
71+
![PR Release Notes](./docs/images/openai-pr-release-notes.png)
7272
73-
![PR Review](./docs/images/chatgpt-pr-review.png)
73+
![PR Review](./docs/images/openai-pr-review.png)
7474
7575
### Configuration
7676
@@ -86,12 +86,12 @@ See also: [./action.yml](./action.yml)
8686

8787
#### Inputs
8888

89-
- `debug`: Enable debug mode, will show messages and responses between ChatGPT
89+
- `debug`: Enable debug mode, will show messages and responses between OpenAI
9090
server in CI logs.
9191
- `review_comment_lgtm`: Leave comments even the patch is LGTM
9292
- `path_filters`: Rules to filter files to be reviewed.
9393
- `temperature`: Temperature of the GPT-3 model.
94-
- `system_message`: The message to be sent to ChatGPT to start a conversation.
94+
- `system_message`: The message to be sent to OpenAI to start a conversation.
9595

9696
### Prompt templates:
9797

@@ -146,7 +146,7 @@ jobs:
146146
ref: ${{github.event.pull_request.head.ref}}
147147
submodules: false
148148
149-
- uses: fluxninja/chatgpt-pr-reviewer@main
149+
- uses: fluxninja/openai-pr-reviewer@main
150150
env:
151151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152152
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -157,15 +157,11 @@ jobs:
157157
See also:
158158
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target
159159

160-
### Inspect the messages between ChatGPT server
160+
### Inspect the messages between OpenAI server
161161

162162
Set `debug: true` in the workflow file to enable debug mode, which will show the
163163
messages
164164

165-
[1]:
166-
https://github.com/marketplace?type=&verification=&query=chatgpt-pr-reviewer+
167-
[2]: https://www.npmjs.com/package/chatgpt
168-
169165
### Special Thanks
170166

171167
This GitHub Action is based on

action.yml

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
name: 'ChatGPT PR Reviewer & Summarizer'
2-
description: 'ChatGPT based PR reviewer and summarizer'
1+
name: "OpenAI-based PR Reviewer & Summarizer"
2+
description: "OpenAI-based PR Reviewer and Summarizer"
33
branding:
4-
icon: 'aperture'
5-
color: 'orange'
6-
author: 'FluxNinja, Inc.'
4+
icon: "aperture"
5+
color: "orange"
6+
author: "FluxNinja, Inc."
77
inputs:
88
debug:
99
required: false
10-
description: 'Enable debug mode'
11-
default: 'false'
10+
description: "Enable debug mode"
11+
default: "false"
1212
temperature:
1313
required: false
14-
description: 'Temperature for ChatGPT model'
15-
default: '0.0'
14+
description: "Temperature for GPT model"
15+
default: "0.0"
1616
review_comment_lgtm:
1717
required: false
18-
description: 'Leave comments even if the patch is LGTM'
19-
default: 'false'
18+
description: "Leave comments even if the patch is LGTM"
19+
default: "false"
2020
path_filters:
2121
required: false
2222
description: |
@@ -44,21 +44,16 @@ inputs:
4444
!**/vendor/**
4545
system_message:
4646
required: false
47-
description: 'System message to be sent to ChatGPT'
47+
description: "System message to be sent to OpenAI"
4848
default: |
4949
You are a very experienced software engineer. You are able to thoroughly review code and uncover
5050
issues, such as bugs, potential data races, livelocks, starvation, suspension, order violation,
5151
atomicity violation, consistency issues, complexity issues, error handling and so on.
5252
5353
We will be doing code reviews today. Please prefer markdown format in your responses.
54-
chatgpt_reverse_proxy:
55-
required: false
56-
description: |
57-
The URL of the chatgpt reverse proxy, see also https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy
58-
default: https://chat.duti.tech/api/conversation
5954
summarize_beginning:
6055
required: false
61-
description: 'The prompt for the whole pull request'
56+
description: "The prompt for the whole pull request"
6257
default: |
6358
$system_message
6459
@@ -79,7 +74,7 @@ inputs:
7974
Reply "OK" to confirm that you are ready to receive the diffs for summarization.
8075
summarize_file_diff:
8176
required: false
82-
description: 'The prompt for each file diff'
77+
description: "The prompt for each file diff"
8378
default: |
8479
Providing diff for `$filename`.
8580
@@ -93,7 +88,7 @@ inputs:
9388
```
9489
summarize:
9590
required: false
96-
description: 'The prompt for final summarization response'
91+
description: "The prompt for final summarization response"
9792
default: |
9893
This is the end of summarization session. Please provide the final response as follows in
9994
the `markdown` format with the following content:
@@ -106,7 +101,7 @@ inputs:
106101
request.
107102
summarize_release_notes:
108103
required: false
109-
description: 'The prompt for generating release notes'
104+
description: "The prompt for generating release notes"
110105
default: |
111106
Next, release notes in `markdown` format for this pull request that focuses on the purpose
112107
of this PR. If needed, you can classify the changes as "New Feature", "Bug fix",
@@ -116,7 +111,7 @@ inputs:
116111
used as is in our release notes.
117112
review_beginning:
118113
required: false
119-
description: 'The beginning prompt of a code review dialog'
114+
description: "The beginning prompt of a code review dialog"
120115
default: |
121116
$system_message
122117
@@ -128,14 +123,14 @@ inputs:
128123
129124
> $description.
130125
131-
ChatGPT generated summary is as follows,
126+
OpenAI generated summary is as follows,
132127
133128
> $summary
134129
135130
Reply "OK" to confirm that you are ready for further instructions.
136131
review_file:
137132
required: false
138-
description: 'The prompt for each file'
133+
description: "The prompt for each file"
139134
default: |
140135
Providing `$filename` content as context. Please use this context when reviewing patches.
141136
@@ -144,7 +139,7 @@ inputs:
144139
```
145140
review_file_diff:
146141
required: false
147-
description: 'The prompt for each file diff'
142+
description: "The prompt for each file diff"
148143
default: |
149144
Providing entire diff for `$filename` as context. Please use this context when reviewing patches.
150145
@@ -153,7 +148,7 @@ inputs:
153148
```
154149
review_patch_begin:
155150
required: false
156-
description: 'The prompt for each file diff'
151+
description: "The prompt for each file diff"
157152
default: |
158153
Next, I will send you a series of patches, each of them consists of a diff snippet, and you
159154
need to do a brief code review for every patch, and tell me any bug risk or improvement
@@ -164,13 +159,13 @@ inputs:
164159
preferred for your responses. Reply "OK" to confirm.
165160
review_patch:
166161
required: false
167-
description: 'The prompt for each chunks/patches'
162+
description: "The prompt for each chunks/patches"
168163
default: |
169164
$filename
170165
171166
```diff
172167
$patch
173168
```
174169
runs:
175-
using: 'node16'
176-
main: 'dist/index.js'
170+
using: "node16"
171+
main: "dist/index.js"

0 commit comments

Comments
 (0)