name: CDS Code Review with OpenAI
on:
  pull_request:
    types:
      - opened
      - synchronize

permissions: write-all
jobs:
  code_review:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2
        with:
          path: ./
      - name: Code Review
        uses: ./act/fixtures/actions
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
          OPENAI_API_MODEL: ${{ vars.OPENAI_API_MODEL }}
          OPENAI_API_VERSION: ${{ vars.OPENAI_API_VERSION }}
          OPENAI_BASE_URL: ${{ vars.OPENAI_BASE_URL }}
          exclude: "yarn.lock,dist/**"
