From eb26a48ad4577ec32c3e9536c2568a5de3cb96cc Mon Sep 17 00:00:00 2001 From: Zurab Developer <75216044+ZurabDev@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:04:05 +0300 Subject: [PATCH] feat(chore): pr ai reviewer #000 --- .github/workflows/pr-describe.yaml | 2 +- .github/workflows/pr-review.yml | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pr-review.yml diff --git a/.github/workflows/pr-describe.yaml b/.github/workflows/pr-describe.yaml index a74ea93dc..e16045396 100644 --- a/.github/workflows/pr-describe.yaml +++ b/.github/workflows/pr-describe.yaml @@ -18,6 +18,6 @@ jobs: - name: PR Auto Describe uses: salehhashemi1992/pr-auto-describe@main with: - github-token: ${{ secrets.TOKEN }} + github-token: ${{ secrets.GITHUB_TOKEN }} openai-api-key: ${{ secrets.OA_KEY }} openai-model: 'gpt-4o-mini' # Optional, you can use 'gpt-3.5-turbo' or 'gpt-4-32k' as well. diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml new file mode 100644 index 000000000..870e368c9 --- /dev/null +++ b/.github/workflows/pr-review.yml @@ -0,0 +1,20 @@ +name: AI 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.OA_KEY }} + LANGUAGE: 'russian' + MODEL: 'gpt-4o-mini'