From 7aa514a38f9488a1ad5dbc31947890fc29e8a8a7 Mon Sep 17 00:00:00 2001 From: Paul Razvan Berg Date: Sun, 25 Jun 2023 00:55:31 +0300 Subject: [PATCH] ci: add OpenAI PR Reviewer --- .github/workflows/reviewer.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/reviewer.yml diff --git a/.github/workflows/reviewer.yml b/.github/workflows/reviewer.yml new file mode 100644 index 0000000..1ff7f47 --- /dev/null +++ b/.github/workflows/reviewer.yml @@ -0,0 +1,29 @@ +name: "OpenAI PR Reviewer" + +concurrency: + cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }} + group: + ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}-${{ + github.event_name == 'pull_request_review_comment' && 'pr_comment' || 'pr' }} + +on: + pull_request: + pull_request_review_comment: + types: ["created"] + +permissions: + contents: "read" + pull-requests: "write" + +jobs: + review: + runs-on: "ubuntu-latest" + steps: + - uses: "fluxninja/openai-pr-reviewer@latest" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + with: + debug: false + review_comment_lgtm: false + review_simple_changes: false