Conversation
…tions new command
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughReorders the Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/commands/database/db-migration-new.ts`:
- Around line 92-108: Update the unit tests so isInteractive can be mocked and
tests cover both branches: add a top-level vi.mock for the module exporting
isInteractive in tests/unit/commands/database/db-migration-new.test.ts, then in
the interactive-path tests set the mocked isInteractive to return true before
requiring or invoking the command so the inquirer.prompt branch runs (and assert
prompt is called and description used), and add a new test that sets
isInteractive to false and asserts the command throws the non-interactive error
(matching the new thrown Error message). Ensure you reference/mock the same
exported symbol isInteractive and keep existing assertions for inquirer.prompt
in the interactive tests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d166b081-998b-429d-a107-cc9cbb822097
📒 Files selected for processing (2)
src/commands/database/database.tssrc/commands/database/db-migration-new.ts
Co-authored-by: Eduardo Bouças <mail@eduardoboucas.com>
🎉 Thanks for submitting a pull request! 🎉
Summary
Main goal here is to avoid using
inquirerin non-interactive mode.I did smuggle in here preference to using
timestampnumbering schema over sequential as it is less problematic when working on parallel changes. We still will honor sequential and default to it if this is a scheme already used by a project. This part is optimistic and can walk it back if deemed undesirable.Currently non-interactive works only when both
--schemeand--descriptionis provided:But if they are not - there is non-helpful error happening:
With changes in this PR:
--description:For us to review and ship your PR efficiently, please perform the following steps:
passes our tests.
A picture of a cute animal (not mandatory, but encouraged)