From 26bf9ca4b7d62bc9602830bb832312877ffe6f2e Mon Sep 17 00:00:00 2001 From: Chaitanya Deorukhkar Date: Thu, 26 Oct 2023 14:54:24 +0530 Subject: [PATCH] feat: add AI PR Reviewer (#1748) --- .github/workflows/ai-pr-review.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/ai-pr-review.yml diff --git a/.github/workflows/ai-pr-review.yml b/.github/workflows/ai-pr-review.yml new file mode 100644 index 00000000000..a9c6c8f2e9f --- /dev/null +++ b/.github/workflows/ai-pr-review.yml @@ -0,0 +1,29 @@ +name: AI 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 # nosemgrep: non-self-hosted-runner + steps: + - uses: coderabbitai/ai-pr-reviewer@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + with: + debug: true + review_simple_changes: false + review_comment_lgtm: false