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

Commit a2a2f26

Browse files
authored
update readme (#233)
1 parent 7751de6 commit a2a2f26

File tree

1 file changed

+35
-50
lines changed

1 file changed

+35
-50
lines changed

README.md

Lines changed: 35 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,55 +8,29 @@ This [OpenAI ChatGPT-based](https://platform.openai.com/docs/guides/chat) GitHub
88
Action provides a summary, release notes and review of pull requests. The unique
99
features of this action are:
1010

11-
- Unlike other approaches that provide a simple summary and/or conversation,
12-
this action reviews the changes line by line and provides code change
13-
suggestions that can be directly committed from the GitHub UI. The prompts
14-
have been tuned carefully to comment on exact lines within changed hunks of
15-
code.
16-
- Continuous, yet incremental, reviews on each commit with a pull request. This
17-
is unlike other approaches that provide a one-time review on the entire pull
18-
request when requested by the user.
19-
- Incremental reviews save on OpenAI costs while also reducing noise. Changed
20-
files are tracked between commits and the base of the pull request
21-
- The action is designed to be used with a "light" summarization model (e.g.
22-
`gpt-3.5-turbo`) and a "heavy" review model (e.g. `gpt-4`). This allows for a
23-
cheaper and faster summarization process and a more accurate review process.
24-
**For best results, setting `gpt-4` as the "heavy" model instead of the
25-
`gpt-3.5-turbo` (default) is highly recommended.**
26-
- This action supports a conversation with the bot in the context of lines of
27-
code or entire files. Useful for providing further context to the bot for its
28-
next review, to generate test cases, to reduce complexity of the code and so
29-
on.
30-
- By default, the action is configured to skip more in-depth review when the
31-
changes are simple (e.g. typo fixes). This is based on the triage done during
32-
the summarization stage. This feature can be disabled by setting
33-
`review_simple_changes` to `true`.
34-
- By default, the action is configured to skip adding review comments when the
35-
changes look good for the most part. This feature can be disabled by setting
36-
`review_comment_lgtm` to `true`.
37-
- You can tailor the following prompts:
38-
- `system_message`: Defines the objective and the personality of the bot. You
39-
can change this prompt to focus on or ignore certain aspects of the review
40-
process, e.g. documentation, code quality, etc. Furthermore, you can even
41-
change the bot to do marketing material review instead of code review.
42-
- `summarize`: Summarizes the pull request into a table of changes etc.
43-
- `summarize_release_notes`: Summarize the changes in the pull request for
44-
release notes purposes.
45-
- You can altogether skip the reviews, setting the `summary_only` to `true`. But
46-
that defeats the main purpose of this action. Other tools such as GitHub's
47-
[Copliot for Pull Requests](https://githubnext.com/projects/copilot-for-pull-requests)
48-
may be a cheaper and good enough alternative in that case.
49-
50-
NOTES:
51-
52-
- Your code (files, diff, PR title/description) will be sent to OpenAI's servers
53-
for processing. Please check with your compliance team before using this on
54-
your private code repositories.
55-
- OpenAI's API is used instead of ChatGPT session on their portal. OpenAI API
56-
has a
57-
[more conservative data usage policy](https://openai.com/policies/api-data-usage-policies)
58-
compared to their ChatGPT offering.
59-
- This action is not affiliated with OpenAI.
11+
- **Line-by-line code change suggestions**: This action reviews the changes line
12+
by line and provides code change suggestions that can be directly committed
13+
from the GitHub UI.
14+
- **Continuous, incremental reviews**: Reviews are performed on each commit
15+
within a pull request, rather than a one-time review on the entire pull
16+
request.
17+
- **Cost-effective and reduced noise**: Incremental reviews save on OpenAI costs
18+
and reduce noise by tracking changed files between commits and the base of the
19+
pull request.
20+
- **"Light" model for summary**: Designed to be used with a "light"
21+
summarization model (e.g. `gpt-3.5-turbo`) and a "heavy" review model (e.g.
22+
`gpt-4`). _For best results, use `gpt-4` as the "heavy" model, as thorough
23+
code review needs strong reasoning abilities._
24+
- **Chat with bot**: Supports conversation with the bot in the context of lines
25+
of code or entire files, useful for providing context, generating test cases,
26+
and reducing code complexity.
27+
- **Smart review skipping**: By default, skips in-depth review for simple
28+
changes (e.g. typo fixes) and when changes look good for the most part. It can
29+
be disabled by setting `review_simple_changes` and `review_comment_lgtm` to
30+
`true`.
31+
- **Customizable prompts**: Tailor the `system_message`, `summarize`, and
32+
`summarize_release_notes` prompts to focus on specific aspects of the review
33+
process or even change the review objective.
6034

6135
## Usage
6236

@@ -136,7 +110,7 @@ To ignore a PR, add the following keyword in the PR description:
136110
- `OPENAI_API_KEY`: use this to authenticate with OpenAI API. You can get one
137111
[here](https://platform.openai.com/account/api-keys). Please add this key to
138112
your GitHub Action secrets.
139-
- `OPENAI_API_ORG`: (optional) use this to use the specified organisation with
113+
- `OPENAI_API_ORG`: (optional) use this to use the specified organization with
140114
OpenAI API if you have multiple. Please add this key to your GitHub Action
141115
secrets.
142116

@@ -265,3 +239,14 @@ https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
265239

266240
Set `debug: true` in the workflow file to enable debug mode, which will show the
267241
messages
242+
243+
### Disclaimer
244+
245+
- Your code (files, diff, PR title/description) will be sent to OpenAI's servers
246+
for processing. Please check with your compliance team before using this on
247+
your private code repositories.
248+
- OpenAI's API is used instead of ChatGPT session on their portal. OpenAI API
249+
has a
250+
[more conservative data usage policy](https://openai.com/policies/api-data-usage-policies)
251+
compared to their ChatGPT offering.
252+
- This action is not affiliated with OpenAI.

0 commit comments

Comments
 (0)