44 pull_request :
55 types : [opened, synchronize]
66 # Optional: Only run on specific file changes
7- # paths:
8- # - "src/**/*.ts"
9- # - "src/**/*.tsx"
10- # - "src/**/*.js"
11- # - "src/**/*.jsx"
7+ paths :
8+ - ' src/**/*.ts'
9+ - ' src/**/*.tsx'
10+ - ' src/**/*.js'
11+ - ' src/**/*.jsx'
12+ - ' package.json'
13+ - ' package-lock.json'
1214
1315jobs :
1416 claude-review :
15- # Optional: Filter by PR author
16- # if: |
17- # github.event.pull_request.user.login == 'external-contributor' ||
18- # github.event.pull_request.user.login == 'new-developer' ||
19- # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20-
17+ # Optional: Skip review for specific conditions
18+ if : |
19+ !contains(github.event.pull_request.title, '[skip-review]') &&
20+ !contains(github.event.pull_request.title, '[WIP]')
21+
2122 runs-on : ubuntu-latest
2223 permissions :
2324 contents : read
2425 pull-requests : read
2526 issues : read
2627 id-token : write
27-
28+
2829 steps :
2930 - name : Checkout repository
3031 uses : actions/checkout@v4
@@ -37,42 +38,64 @@ jobs:
3738 with :
3839 claude_code_oauth_token : ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3940
40- # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
41- # model: " claude-opus-4-20250514"
42-
41+ # Specify model for consistency with main workflow
42+ model : ' claude-opus-4-20250514'
43+
4344 # Direct prompt for automated review (no @claude mention needed)
4445 direct_prompt : |
45- Please review this pull request and provide feedback on:
46- - Code quality and best practices
47- - Potential bugs or issues
48- - Performance considerations
49- - Security concerns
50- - Test coverage
51-
52- Be constructive and helpful in your feedback.
53-
54- # Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
55- # use_sticky_comment: true
56-
46+ Review this YDB Embedded UI pull request focusing on:
47+
48+ 1. **Code Standards**:
49+ - TypeScript type safety and proper interface usage (prefixed with 'T')
50+ - React best practices and Gravity UI component usage
51+ - Redux Toolkit patterns with RTK Query
52+ - BEM naming convention with cn() utility
53+
54+ 2. **Critical Requirements**:
55+ - All user-facing text must use i18n (no hardcoded strings)
56+ - API calls must go through window.api, never direct calls
57+ - No state mutations in RTK Query
58+ - Route params validation (React Router v5)
59+
60+ 3. **Performance & Security**:
61+ - Virtual scrolling for large tables (PaginatedTable)
62+ - React.memo for expensive renders
63+ - No exposed secrets or keys
64+ - Proper error handling and loading states
65+
66+ 4. **Testing**:
67+ - Unit tests in __test__ directories
68+ - E2E tests follow page object pattern
69+
70+ Be constructive and reference specific files with file_path:line_number format.
71+
72+ # Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
73+ use_sticky_comment : true
74+
5775 # Optional: Customize review based on file types
5876 # direct_prompt: |
5977 # Review this PR focusing on:
6078 # - For TypeScript files: Type safety and proper interface usage
6179 # - For API endpoints: Security, input validation, and error handling
6280 # - For React components: Performance, accessibility, and best practices
6381 # - For tests: Coverage, edge cases, and test quality
64-
82+
6583 # Optional: Different prompts for different authors
6684 # direct_prompt: |
67- # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
85+ # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
6886 # 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
6987 # 'Please provide a thorough code review focusing on our coding standards and best practices.' }}
70-
71- # Optional: Add specific tools for running tests or linting
72- # allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"
73-
88+
89+ # Add specific tools for running tests or linting
90+ allowed_tools : |
91+ Bash(npm run lint)
92+ Bash(npm run typecheck)
93+ Bash(npm test -- --no-watch)
94+ Bash(npm run unused)
95+ Bash(git diff)
96+ Bash(git log)
97+
7498 # Optional: Skip review for certain conditions
7599 # if: |
76100 # !contains(github.event.pull_request.title, '[skip-review]') &&
77101 # !contains(github.event.pull_request.title, '[WIP]')
78-
0 commit comments