-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from HDVInsurance/develop
Add docs, optional model name parameter. Defaults to gpt-3.5-turbo-16k
- Loading branch information
Showing
3 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# GitHub Pull Request Reviewer Action | ||
|
||
This repository contains a GitHub Action that automates the process of reviewing pull requests using OpenAI's GPT model. | ||
|
||
## Features | ||
|
||
- Fetches the diff of the changes when a pull request is opened or updated. | ||
- Submits the diff to the GPT model for review. | ||
- Posts the model's response as a comment on the pull request. | ||
|
||
## Usage | ||
|
||
To use this action in your GitHub workflows, add a step to your workflow file that references this repository: | ||
|
||
```yaml | ||
- name: Run PR Reviewer | ||
uses: hdvinsurance/gpt-code-review-action@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
openai_api_key: ${{ secrets.OPENAI_API_KEY }} | ||
``` | ||
## Inputs | ||
The action accepts the following inputs: | ||
- `github_token` (**required**): The GitHub token used to post comments on the pull request. This is a required input. | ||
|
||
- `openai_api_key`: The OpenAI API key. This is required if the `OPENAI_API_KEY` environment variable is not set. This input is optional. | ||
|
||
- `pr_review_prompt_template`: Provide a PR review prompt template to optionally override the default prompt template with your own. This input is optional and defaults to an empty string. | ||
|
||
- `model_name`: Optional. Defaults to `gpt-3.5-turbo-16k`. | ||
|
||
## Outputs | ||
|
||
The action produces the following output: | ||
|
||
- `pr_review`: The PR review text. Note: this is the raw output from the GPT model and may contain newlines and other formatting characters. | ||
|
||
## Considerations and Limitations | ||
|
||
Code Reviews performed by a generative AI process may not always be correct. Exercise caution when evaluating the suggestions of the model. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters