From 890a71a6a703bcd3f75e264a3d7107d91a93864d Mon Sep 17 00:00:00 2001 From: PierreGode Date: Tue, 10 Dec 2024 14:02:40 +0100 Subject: [PATCH] Update review.yml --- .github/workflows/review.yml | 132 +++++++++++++++++++++++++++++++---- 1 file changed, 118 insertions(+), 14 deletions(-) diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 16aa623..5f10fa1 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -1,22 +1,126 @@ -name: GPTcode-reviewer - +name: PR Summary and Inline Issues Check on: pull_request: - types: - - opened - - synchronize -permissions: write-all + types: [opened, synchronize, reopened] + jobs: - review: + summarize_and_check: runs-on: ubuntu-latest steps: - - name: Checkout Repo - uses: actions/checkout@v4 + - name: Checkout Code + uses: actions/checkout@v3 - - name: GPTcode-reviewer - uses: PierreGode/GPTcode-reviewer@PR-LOG + - name: Set Up Python + uses: actions/setup-python@v4 with: - GITHUB_TOKEN: ${{ secrets.G_TOKEN }} + python-version: '3.9' + + - name: Install Python Dependencies + run: | + python -m pip install --upgrade pip + pip install requests + + - name: Run AI Analysis + env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - OPENAI_API_MODEL: "gpt-4o-mini" # Optional: defaults to "gpt-4" - exclude: "**/*.json, **/*.md" # Optional: exclude patterns separated by commas + GITHUB_TOKEN: ${{ secrets.G_TOKEN }} + run: | + python - <