From ccdd74f67c07eb704f5bde4a63ccd0ded442645d Mon Sep 17 00:00:00 2001 From: Max Clayton Clowes Date: Mon, 25 Nov 2024 10:26:31 +0000 Subject: [PATCH] replace workflows --- .github/workflows/codereviews.yml | 24 ++++++++++++++++++++++-- .github/workflows/diff-descriptions.yml | 17 ----------------- 2 files changed, 22 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/diff-descriptions.yml diff --git a/.github/workflows/codereviews.yml b/.github/workflows/codereviews.yml index 3aaac7a16..c7b5f0320 100644 --- a/.github/workflows/codereviews.yml +++ b/.github/workflows/codereviews.yml @@ -1,2 +1,22 @@ -- name: Code Review with ChatGPT - uses: cirolini/genai-code-review@v2 +on: + pull_request: + types: [opened, synchronize] + +jobs: + code_review_job: + runs-on: ubuntu-latest + name: ChatGPT Code Review + steps: + - name: GenAI Code Review + uses: cirolini/genai-code-review@v2 + with: + openai_api_key: ${{ secrets.OPENAI_API_KEY }} + github_token: ${{ secrets.GITHUB_TOKEN }} + github_pr_id: ${{ github.event.number }} + #openai_model: "gpt-4o" # optional + openai_model: "gpt-3.5-turbo" # optional + openai_temperature: 0.5 # optional + openai_max_tokens: 2048 # optional + mode: files # files or patch + language: en # optional, default is 'en' + custom_prompt: "" # optional \ No newline at end of file diff --git a/.github/workflows/diff-descriptions.yml b/.github/workflows/diff-descriptions.yml deleted file mode 100644 index b5bb40dd4..000000000 --- a/.github/workflows/diff-descriptions.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: GPT commits summarizer -# Summary: This action will write a comment about every commit in a pull request, as well as generate a summary for every file that was modified and add it to the review page, compile a PR summary from all commit summaries and file diff summaries, and delete outdated code review comments - -on: - pull_request: - types: [opened, synchronize] - -jobs: - summarize: - runs-on: ubuntu-latest - permissions: write-all # Some repositories need this line - - steps: - - uses: KanHarI/gpt-commit-summarizer@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}