Merge pull request #22 from HeyGarrison/lesson-11-demo #69
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: AI Code Review | |
| # Temporarily disabled for lesson recording | |
| # on: | |
| # pull_request: | |
| # types: [opened, synchronize] | |
| # paths: | |
| # - '**.js' | |
| # - '**.ts' | |
| # - '**.jsx' | |
| # - '**.tsx' | |
| # - '**.py' | |
| jobs: | |
| ai-review: | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.draft == false && github.head_ref != 'demo-auto-bug-fix' | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch full history for git diff | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - name: Install dependencies | |
| working-directory: lesson-2-adding-automation-to-first-strategic-agent | |
| run: npm install | |
| - name: Run AI code review | |
| working-directory: lesson-2-adding-automation-to-first-strategic-agent | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} | |
| GITHUB_BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| GITHUB_HEAD_REF: ${{ github.event.pull_request.head.ref }} | |
| run: node ci-runner.js | |
| - name: Upload review logs | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: ai-review-logs | |
| path: | | |
| *.log | |
| .ai-review-* |