feat: avatar #19
Workflow file for this run
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: Pull Request Analysis | |
| on: | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| analyze: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Install Claude Code SDK | |
| run: npm install -g @anthropic-ai/claude-code | |
| - name: Run Claude Code Review | |
| run: | | |
| PR_DIFF=$(git diff origin/master...HEAD) | |
| CLAUDE_CR_PROMPT=$(cat .ai/prompts/code-review.md) | |
| claude --append-system-prompt "$CLAUDE_CR_PROMPT" \ | |
| --print "Przeprowadź Code Review:\n\n $PR_DIFF" \ | |
| > claude-review.md | |
| env: | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| - name: Comment PR with Claude Code Review | |
| if: ${{ github.event_name == 'pull_request' }} | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| header: claude-code-review | |
| path: claude-review.md |