From f523cedd8f23a10bc7f46ac90bb2d44782f68325 Mon Sep 17 00:00:00 2001 From: Arek Burdach Date: Thu, 14 Nov 2024 21:14:38 +0100 Subject: [PATCH] Added ai-pr-reviewer.yaml workflow --- .github/workflows/ai-pr-reviewer.yml | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/ai-pr-reviewer.yml diff --git a/.github/workflows/ai-pr-reviewer.yml b/.github/workflows/ai-pr-reviewer.yml new file mode 100644 index 00000000000..6b4414dd29f --- /dev/null +++ b/.github/workflows/ai-pr-reviewer.yml @@ -0,0 +1,30 @@ +name: Code Review + +permissions: + contents: read + pull-requests: write + +on: + pull_request: + pull_request_review_comment: + types: [created] + +concurrency: + group: + ${{ github.repository }}-${{ github.event.number || github.head_ref || + github.sha }}-${{ github.workflow }}-${{ github.event_name == + 'pull_request_review_comment' && 'pr_comment' || 'pr' }} + cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }} + +jobs: + review: + runs-on: ubuntu-latest + steps: + - uses: coderabbitai/ai-pr-reviewer@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + with: + debug: false + review_simple_changes: false + review_comment_lgtm: false