Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThe PR introduces test plan filtering functionality. It adds a new test-plans module for fetching test plans by ID, exports it from the tools index, adds a CLI option to specify test plan ID, and extends pullTestTarget to optionally accept and pass testPlanId as a query parameter when fetching test targets. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@src/tools/test-plans.ts`:
- Around line 4-6: The build is failing because the path
"/apiKey/beta/test-plans/{id}" referenced by GetTestPlanParams in
src/tools/test-plans.ts doesn't exist in the generated API types; either
regenerate the API types from the OpenAPI spec so paths includes the test-plan
endpoints or change GetTestPlanParams to the actual existing path name in the
generated `paths` type (inspect the `paths` union in ../api to find the correct
test-plan path), and update any related types (TestPlanResponse and any usages)
to reference the correct schema names from `components["schemas"]`; after
updating, re-run type-check to ensure lines 6, 11, and 25 no longer error.
In `@tests/tools/test-plans.spec.ts`:
- Around line 17-29: The mockTestPlan object in tests/tools/test-plans.spec.ts
does not match the real ExternalTestPlanSchema (it lacks fields like app, tags,
environments, etc.); update the mockTestPlan to mirror ExternalTestPlanSchema by
adding the missing properties (e.g., app, tags, environments and any required
nested shapes) and ensure types/field names and value shapes match those defined
by ExternalTestPlanSchema so tests use realistic data; reference the
mockTestPlan constant in this file when making the changes.
- Around line 50-63: The current test for getTestPlan mixes the API-error path
and the missing-data path by returning both error and data: undefined; split
this into two tests: (1) simulate an API error by mocking
vi.mocked(client.GET).mockResolvedValue({ data: undefined, error: { message:
"Not found" }, response: mock() }) and assert handleError was called with that
error (do not expect a throw since handleError should handle exit), and (2)
simulate missing data by mocking vi.mocked(client.GET).mockResolvedValue({ data:
undefined, error: undefined, response: mock() }) and assert getTestPlan({ id })
rejects with `No test plan with id ${id} found`; update test names accordingly
and keep references to getTestPlan and handleError to locate the code to change.
Summary by CodeRabbit
New Features
--test-plan-idparameter to the pull command to filter test cases by a specific test plan✏️ Tip: You can customize this high-level summary in your review settings.