From 80d53b96d3f2c67098ec31ff0b4b6d9b861b78f8 Mon Sep 17 00:00:00 2001 From: Matt <77928207+mattzcarey@users.noreply.github.com> Date: Mon, 10 Jul 2023 16:43:45 +0100 Subject: [PATCH] feat: code-review-gpt (#555) --- .github/workflows/code-review-gpt.yml | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/code-review-gpt.yml diff --git a/.github/workflows/code-review-gpt.yml b/.github/workflows/code-review-gpt.yml new file mode 100644 index 000000000000..f4e8af88c2c0 --- /dev/null +++ b/.github/workflows/code-review-gpt.yml @@ -0,0 +1,30 @@ +name: Code Review GPT + +on: + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + environment: preview + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install code-review-gpt + run: npm install code-review-gpt + + - name: Run code review script + run: npx code-review-gpt --ci + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BASE_SHA: ${{ github.event.pull_request.base.sha }} + GITHUB_SHA: ${{ github.sha }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}