Skip to content

Commit

Permalink
Modify Readme: Trim it down. Modify test-action for reference. Modify…
Browse files Browse the repository at this point in the history
… action for naming. Modify review script for naming. remove Images.
  • Loading branch information
mono-chrome committed Jan 13, 2023
1 parent 36f8e6f commit 903866a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [pull_request]
jobs:
hello_world_job:
runs-on: ubuntu-latest
name: Test if the action works
name: OpenAI PR Comment
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -16,7 +16,7 @@ jobs:
echo $diff
echo "DIFF=$(echo $diff)" >> $GITHUB_ENV
- id: review
uses: samjhill/GPTReview@main
uses: mono-chrome/GPTReviewWorkflow@main
with:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
# GPTReview 🤖🔍
# GPTReview Workflow 🤖🔍

Get OpenAI GPT models to suggest changes on your pull request in the comments!

## Example output

![example review](./images/example.png)

[example 2](https://github.com/samjhill/GPTReview/pull/9)
Get OpenAI GPT models to suggest changes on your pull request in the comments.

## How to integrate into your repo:

1. Copy the workflow from this repo's .github/workflows/test-action.yml into your project in the same location and modify it to suit your needs, if you'd like.


2. Get an [OpenAI key here](https://openai.com/api/)


3. Create a secret in your project's settings called OPENAI_API_KEY for your OpenAI API Key.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'GPTReview'
name: 'GPTReviewWorkflow'
description: 'Let AI review your code'
inputs:
OPENAI_API_KEY:
Expand Down Expand Up @@ -44,7 +44,7 @@ runs:
- name: Fetch review logic
uses: wei/wget@v1
with:
args: -O review.py https://raw.githubusercontent.com/samjhill/GPTReview/main/review.py
args: -O review.py https://raw.githubusercontent.com/mono-chrome/GPTReviewWorkflow/main/review.py
- name: Review PR and make comment
shell: bash
run: |
Expand Down
Binary file removed images/example.png
Binary file not shown.
2 changes: 1 addition & 1 deletion review.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import requests
import json
import subprocess
import subprocess #is this still needed?
import openai


Expand Down

0 comments on commit 903866a

Please sign in to comment.