Add activity feed APi #71
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: Claude Code Review | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| # Optional: Only run on specific file changes | |
| # paths: | |
| # - "src/**/*.ts" | |
| jobs: | |
| claude-review: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Full write access to repository contents | |
| pull-requests: write # Ability to create, update, and merge PRs | |
| issues: write # Ability to manage issues | |
| id-token: write # Required for OIDC authentication | |
| actions: write # Ability to manage GitHub Actions | |
| checks: write # Ability to create and update check runs | |
| statuses: write # Ability to update commit statuses | |
| discussions: write # Ability to manage discussions | |
| packages: write # Ability to manage packages | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Run Claude Code Review | |
| id: claude-review | |
| uses: anthropics/claude-code-action@beta | |
| with: | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) | |
| model: "claude-opus-4-20250514" | |
| # Direct prompt for automated review (no @claude mention needed) | |
| direct_prompt: | | |
| Please review this Lean 4 pull request for the NumpySpec project and provide feedback on: | |
| - Lean 4 code correctness and idiomatic usage | |
| - Mathematical correctness and formal verification | |
| - Adherence to Mathlib conventions | |
| - Use of proper Lean tactics and proof strategies | |
| - Type safety and proper use of Lean's type system | |
| - Performance considerations for matrix operations | |
| - Python test coverage for NumPy compatibility | |
| - Compliance with project guidelines in CLAUDE.md | |
| Focus on: | |
| - Named holes (?foo) for incremental development | |
| - Proper use of typeclasses like GetElem, Add, etc. | |
| - Avoiding common Lean pitfalls (see CLAUDE.md) | |
| - Ensuring lake build passes without errors | |
| Be constructive and helpful in your feedback. | |
| # Optional: Customize review based on file types | |
| # direct_prompt: | | |
| # Review this PR focusing on: | |
| # - For TypeScript files: Type safety and proper interface usage | |
| # - For API endpoints: Security, input validation, and error handling | |
| # - For React components: Performance, accessibility, and best practices | |
| # - For tests: Coverage, edge cases, and test quality | |
| # Optional: Different prompts for different authors | |
| # direct_prompt: | | |
| # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' && | |
| # 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' || | |
| # 'Please provide a thorough code review focusing on our coding standards and best practices.' }} | |
| # Allow comprehensive tools for Lean 4 project review | |
| allowed_tools: | | |
| Bash(*), | |
| Read(*), | |
| Glob(*), | |
| Grep(*), | |
| LS(*), | |
| TodoRead(*) | |
| # Optional: Skip review for certain conditions | |
| # if: | | |
| # !contains(github.event.pull_request.title, '[skip-review]') && | |
| # !contains(github.event.pull_request.title, '[WIP]') | |