diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 22bf75a..9524469 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -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: @@ -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 }} diff --git a/README.md b/README.md index b6ccb3d..1582a08 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file diff --git a/action.yml b/action.yml index 967dc56..d480159 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -name: 'GPTReview' +name: 'GPTReviewWorkflow' description: 'Let AI review your code' inputs: OPENAI_API_KEY: @@ -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: | diff --git a/images/example.png b/images/example.png deleted file mode 100644 index cfe432b..0000000 Binary files a/images/example.png and /dev/null differ diff --git a/review.py b/review.py index 32ae2a7..2ff71c4 100644 --- a/review.py +++ b/review.py @@ -1,7 +1,7 @@ import os import requests import json -import subprocess +import subprocess #is this still needed? import openai