feat: clock #4
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: Code Review for PRs | |
| on: | |
| pull_request: | |
| branches: [master] | |
| types: [labeled] | |
| jobs: | |
| code-review: | |
| if: contains(github.event.label.name, 'claude-code-review') | |
| 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: Comment PR with Claude Code Review | |
| if: ${{ github.event_name == 'pull_request' }} | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| header: claude-code-review | |
| message: 🔎 Code Review w trakcie... | |
| - 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 |