Conversation
📝 WalkthroughWalkthroughThe pull request contains infrastructure and logging refactoring changes. The GitHub Actions workflows in 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/merge/tests/log.rs (1)
21-21: Optional: extract a tiny test helper for logger setup.
RunLogger::new(&mut buffer, &behaviours)repeats across most test cases; a helper would reduce duplication and make future API renames cheaper.♻️ Suggested refactor
+fn new_logger<'a>( + buffer: &'a mut Vec<u8>, + behaviours: &RunBehaviours, +) -> RunLogger<&'a mut Vec<u8>> { + RunLogger::new(buffer, behaviours) +}- let mut l = RunLogger::new(&mut buffer, &RunBehaviours::default()); + let mut l = new_logger(&mut buffer, &RunBehaviours::default());🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/merge/tests/log.rs` at line 21, Create a small test helper that centralizes the repeated logger setup to reduce duplication: add a function (e.g., make_test_logger or setup_run_logger) that accepts a mutable buffer (or constructs one) and optional behaviours, and returns the instantiated RunLogger created via RunLogger::new(&mut buffer, &behaviours) using RunBehaviours::default when behaviours are not provided; then replace direct calls to RunLogger::new(&mut buffer, &RunBehaviours::default()) in tests with the new helper to simplify future API renames and keep tests DRY.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/merge/tests/log.rs`:
- Line 21: Create a small test helper that centralizes the repeated logger setup
to reduce duplication: add a function (e.g., make_test_logger or
setup_run_logger) that accepts a mutable buffer (or constructs one) and optional
behaviours, and returns the instantiated RunLogger created via
RunLogger::new(&mut buffer, &behaviours) using RunBehaviours::default when
behaviours are not provided; then replace direct calls to RunLogger::new(&mut
buffer, &RunBehaviours::default()) in tests with the new helper to simplify
future API renames and keep tests DRY.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f1e3be31-9b27-48be-8874-9014991107ff
📒 Files selected for processing (6)
.github/workflows/main.yml.github/workflows/pr.ymljustfilesrc/merge/log.rssrc/merge/mod.rssrc/merge/tests/log.rs
💤 Files with no reviewable changes (3)
- .github/workflows/pr.yml
- justfile
- .github/workflows/main.yml
Encapsulate printing logic into
RunLogger, makingmerge_prsa bit cleaner.