Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cawcaw253/ai-review-action
A GitHub Action that uses the OpenAI API to leave code review comments when Pull Requests are enabled.
https://github.com/cawcaw253/ai-review-action
ai chatgpt code-quality code-review codereview openai openai-api pull-request
Last synced: 2 months ago
JSON representation
A GitHub Action that uses the OpenAI API to leave code review comments when Pull Requests are enabled.
- Host: GitHub
- URL: https://github.com/cawcaw253/ai-review-action
- Owner: cawcaw253
- License: mit
- Created: 2023-03-19T11:14:58.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-16T08:45:44.000Z (about 1 year ago)
- Last Synced: 2024-10-11T09:41:27.173Z (3 months ago)
- Topics: ai, chatgpt, code-quality, code-review, codereview, openai, openai-api, pull-request
- Language: JavaScript
- Homepage: https://blog.cawcaw253.com/
- Size: 582 KB
- Stars: 18
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# OpenAI PR Code Review Action
OpenAI generate code review when Pull Request opened.
![review_example](./release/capture.png)
# How to use
When you use Personal Access Token, please check permission.
```
name: OpenAI PR Review
uses: cawcaw253/ai-review-action@latest
with:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
LANGUAGE: "english"```
If you use GITHUB_TOKEN, please check jobs permission when leave comment action failed.
```
name: OpenAI Code Review
on:
pull_request:
types: [opened, synchronize]jobs:
review:
permissions: write-all # Check permission when leave comment action failed
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: OpenAI PR Review
uses: cawcaw253/ai-review-action@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
LANGUAGE: "korean"
MODEL: "gpt-3.5-turbo"```
# Inputs
| Inputs | Description | Required | Default |
|----------------|-------------------------------------------|----------|---------------|
| OPENAI_API_KEY | OpenAI Key for API call | true | |
| GITHUB_TOKEN | Token for checkout code and leave comment | true | |
| LANGUAGE | Language for comments | false | English |
| MODEL | Model for chat completion | false | gpt-3.5-turbo |# Outputs
Does not provide any outputs.