diff --git a/.github/workflows/openai-review.yml b/.github/workflows/openai-review.yml new file mode 100644 index 00000000..eb511c4e --- /dev/null +++ b/.github/workflows/openai-review.yml @@ -0,0 +1,29 @@ +name: OpenAI Review + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + review: + if: >- + ${{ !github.event.pull_request.draft && + github.event.pull_request.head.repo.full_name == github.repository && + github.event.pull_request.user.type != 'Bot' }} + uses: Ambiguous-Interactive/review-tools/.github/workflows/openai-review.yml@d8aab4dc3655924360ff17ebb04bbc3a844a493f # v1.1.0 + with: + model: ${{ vars.OPENAI_REVIEW_MODEL }} + effort: ${{ vars.OPENAI_REVIEW_EFFORT }} + timeout-minutes: 15 + secrets: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + permissions: + contents: read + pull-requests: write