Closed vishesh-baghel closed 10 months ago
The codebase has been refined to enhance logging clarity and risk score calculation accuracy. Logging now avoids sensitive detail exposure, warns with streamlined messages, and separates complex object logs. Risk score logic has been fine-tuned to handle identical commit dates with SHA comparisons and decouples calculation from the return phase. Time difference calculations now normalize to days for consistency.
File Path | Change Summary |
---|---|
.../commentService.ts |
Updated to sanitize log messages and streamline file validation warnings. |
.../riskScoreService.ts |
Improved commit date handling with SHA comparison and refined risk score calculation. |
src/utils.ts |
Enhanced getTimeDifference to normalize time difference to days. |
test/fixtures/commits.ts |
Defined commit objects with specific date values for testing. |
🐰✨ In the burrow of the code, we hop and tweak,
Refining logs and scores, a future not bleak.
With each commit's SHA, we dance and compare,
For bugs to be gone, with none left to spare. 🌟🐇
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
Refactor
commentService
to enhance privacy by removing sensitive details.calculateRiskScore
function for better handling of commits with identical dates and clearer separation of calculation from the result.getTimeDifference
function to normalize time differences to days for consistency.Tests
commits.ts
for testing purposes, with specific date values for each commit.Chores