|
| 1 | +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json |
| 2 | + |
| 3 | +language: en-US |
| 4 | + |
| 5 | +reviews: |
| 6 | + # Review draft PRs so we get early feedback |
| 7 | + drafts: true |
| 8 | + |
| 9 | + # Enable high-level summary of changes |
| 10 | + high_level_summary: true |
| 11 | + |
| 12 | + # Add a poem... just kidding, disable it |
| 13 | + poem: false |
| 14 | + |
| 15 | + # Collapse walkthrough to keep PR comments clean |
| 16 | + collapse_walkthrough: true |
| 17 | + |
| 18 | + # Auto-review on every push |
| 19 | + auto_review: |
| 20 | + enabled: true |
| 21 | + drafts: true |
| 22 | + |
| 23 | + # Path-based review instructions |
| 24 | + path_instructions: |
| 25 | + - path: "src/core/**" |
| 26 | + instructions: | |
| 27 | + This is the core SDK module. Pay close attention to: |
| 28 | + - Backward compatibility of public API changes |
| 29 | + - Proper TypeScript typing (strict mode is enabled) |
| 30 | + - No platform-specific code (Node.js, Web, React Native specifics belong in their respective platform directories) |
| 31 | + - Thread safety considerations for shared state |
| 32 | + - path: "src/core/endpoints/**" |
| 33 | + instructions: | |
| 34 | + These are REST API endpoint implementations. Review for: |
| 35 | + - Correct request/response type definitions |
| 36 | + - Proper error handling and status code mapping |
| 37 | + - Consistent parameter validation |
| 38 | + - Adherence to PubNub REST API contracts |
| 39 | + - path: "src/core/types/**" |
| 40 | + instructions: | |
| 41 | + TypeScript type definitions. Ensure: |
| 42 | + - Types are precise and not overly permissive (avoid `any`) |
| 43 | + - Exported types maintain backward compatibility |
| 44 | + - Proper use of generics and utility types |
| 45 | + - path: "src/event-engine/**" |
| 46 | + instructions: | |
| 47 | + State-machine-based subscription management. Review for: |
| 48 | + - Correct state transitions and edge cases |
| 49 | + - No leaked subscriptions or event listeners |
| 50 | + - Proper cleanup on state exit |
| 51 | + - path: "src/entities/**" |
| 52 | + instructions: | |
| 53 | + High-level subscription API (Channel, ChannelGroup, etc.). Review for: |
| 54 | + - Proper event handler lifecycle management |
| 55 | + - Memory leak prevention (listener cleanup) |
| 56 | + - path: "src/transport/**" |
| 57 | + instructions: | |
| 58 | + Platform-specific HTTP transport implementations. Review for: |
| 59 | + - Proper timeout and cancellation handling |
| 60 | + - Correct header management |
| 61 | + - Error propagation consistency across platforms |
| 62 | + - path: "src/node/**" |
| 63 | + instructions: "Node.js platform implementation. Ensure no browser/DOM APIs are used." |
| 64 | + - path: "src/web/**" |
| 65 | + instructions: "Browser platform implementation. Ensure no Node.js-specific APIs (fs, crypto, etc.) are used." |
| 66 | + - path: "src/react_native/**" |
| 67 | + instructions: "React Native platform implementation. Verify compatibility with RN runtime." |
| 68 | + - path: "test/**" |
| 69 | + instructions: | |
| 70 | + Test files. Review for: |
| 71 | + - Adequate coverage of edge cases |
| 72 | + - Proper use of mocks/stubs (Sinon + Nock) |
| 73 | + - No flaky patterns (hardcoded timeouts, race conditions) |
| 74 | + - Tests that actually assert meaningful behavior |
| 75 | +
|
| 76 | + # Tools configuration |
| 77 | + tools: |
| 78 | + # Enable GitHub checks integration |
| 79 | + github-checks: |
| 80 | + enabled: true |
| 81 | + timeout_ms: 120000 |
| 82 | + |
| 83 | +chat: |
| 84 | + auto_reply: true |
| 85 | + |
| 86 | +# Path filters - ignore generated/vendored/build output |
| 87 | +path_filters: |
| 88 | + # Build outputs |
| 89 | + - "!dist/**" |
| 90 | + - "!lib/**" |
| 91 | + - "!upload/**" |
| 92 | + |
| 93 | + # Dependencies |
| 94 | + - "!node_modules/**" |
| 95 | + |
| 96 | + # Unrelated working directories (not part of the SDK source) |
| 97 | + - "!dataSync/**" |
| 98 | + - "!new-dataSync/**" |
| 99 | + - "!demo-app/**" |
| 100 | + - "!loan_quote/**" |
| 101 | + - "!docs/**" |
| 102 | + |
| 103 | + # Lock files - too noisy, low review value |
| 104 | + - "!package-lock.json" |
| 105 | + |
| 106 | + # Config/metadata that rarely needs review |
| 107 | + - "!.pubnub.yml" |
| 108 | + - "!.vscode/**" |
| 109 | + |
| 110 | + # Generated type bundles |
| 111 | + - "!lib/types/**" |
0 commit comments