From f05f1abf97ae0121f77f8c6fff78b7a490d7f69a Mon Sep 17 00:00:00 2001 From: emmdim Date: Fri, 2 Feb 2024 18:27:29 +0100 Subject: [PATCH] Test ai reviewer --- .github/workflows/ai-pr-reviewer.yml | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 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 000000000..160997421 --- /dev/null +++ b/.github/workflows/ai-pr-reviewer.yml @@ -0,0 +1,31 @@ +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: true + review_comment_lgtm: true + openai_heavy_model: gpt-4