Skip to content

GFE Custom EventEmitter #203

GFE Custom EventEmitter

GFE Custom EventEmitter #203

name: Claude Code Review
on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened, labeled]
permissions:
contents: read
pull-requests: write
issues: write
jobs:
review:
runs-on: ubuntu-latest
if: github.actor == 'pertrai1' && contains(github.event.pull_request.labels.*.name, 'code challenge')
permissions:
contents: read
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude Code Review
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
track_progress: true
prompt: |
Review this PR as a coding challenge learning exercise. This repository contains solutions from multiple platforms (LeetCode, GreatFrontEnd, etc.).
CONTEXT:
- REPO: ${{ github.repository }}
- PR NUMBER: ${{ github.event.pull_request.number }}
- Review according to guidelines in CLAUDE.md (includes platform-specific guidelines)
REVIEW CHECKLIST:
1. CORRECTNESS
- Verify solution handles all edge cases
- Test mental trace with the given examples
- Identify any logical errors
2. COMPLEXITY ANALYSIS (for algorithmic problems)
- State the actual time complexity with explanation
- State the actual space complexity with explanation
- Compare to optimal solution if known
- Flag any inaccuracies in code comments
3. LEARNING FOCUS
- For algorithmic problems: Name the pattern(s) used (e.g., sliding window, two pointers, DP)
- For frontend problems: Identify key concepts (e.g., closure, event delegation, async patterns)
- Explain WHY this approach is suitable for this problem
- Suggest 2-3 related problems for practice
- Provide a "Key Insight" - the non-obvious trick that makes this solution work
4. CODE QUALITY
- Variable naming clarity
- Comment quality and accuracy
- Platform-specific best practices (see CLAUDE.md)
5. ALTERNATIVE APPROACHES
- Mention 1-2 alternative approaches
- Explain trade-offs (time vs space, simplicity vs efficiency, browser compatibility, etc.)
Provide detailed inline comments for specific issues.
End with a "Learning Summary" section highlighting key concepts from this problem.
claude_args: |
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"