Closed AlexSim93 closed 3 days ago
The pull request introduces substantial modifications to the Collection
type in src/converters/types.ts
, adding new optional properties for tracking pull request metrics. A new function, calcPRsize
, is introduced to compute pull request sizes, utilizing a constant deletionCoefficient
. The getPullRequestSize
function is updated to leverage this new utility. Additional changes include enhancements to the preparePullRequestStats
and preparePullRequestTimeline
functions, which now incorporate new metrics and refined calculations. New utility functions for generating charts and reports are also added, improving the overall functionality of the codebase.
File Path | Change Summary |
---|---|
src/converters/types.ts |
- Added properties: unreviewed?: number , unapproved?: number , sizes?: Record<string, {...} in Collection type. |
src/converters/utils/calculations/calcPRsize.ts |
- Added method: calcPRsize(additions: number | undefined, deletions: number | undefined) . |
src/converters/utils/calculations/constants.ts |
- Added constant: export const deletionCoefficient = 0.2; . |
src/converters/utils/calculations/getPullRequestSize.ts |
- Updated method to use calcPRsize : getPullRequestSize(additions: number | undefined, deletions: number | undefined) . |
src/converters/utils/calculations/index.ts |
- Added export: deletionCoefficient from ./constants . |
src/converters/utils/preparePullRequestStats.ts |
- Updated function to include calculations for sizes property in collection . Signature: export const preparePullRequestStats = (collection: Collection) . |
src/converters/utils/preparePullRequestTimeline.ts |
- Modified to use getPullRequestSize and calcPRsize . Updated handling of timeToReview and timeToApprove . Added properties: unreviewed and unapproved . Signature: export const preparePullRequestTimeline . |
src/createOutput.ts |
- Added functionality to post comments with correlation graphs if SHOW_CORRELATION_GRAPHS is true. |
src/view/utils/constants.ts |
- Updated constant: additionsDeletionsHeader to "Additions / Deletions". Added constants: unreviewedPrsHeader and unapprovedPrsHeader . |
src/view/utils/createConfigParamsCode.ts |
- Added parameter: "SHOW_CORRELATION_GRAPHS" in the report settings. |
src/view/utils/createDependencyMarkdown.ts |
- Added method: createDependencyMarkdown(data, users, references) . |
src/view/utils/createReviewTable.ts |
- Modified PR size calculation formula to additions + deletions * 0.2 . |
src/view/utils/createSizeDependencyXYChart.ts |
- Added method: createSizeDependencyXYChart(data, type, user) . |
src/view/utils/createTimelineMonthComparisonChart.ts |
- Enhanced filtering logic for dates in createTimelineMonthComparisonChart . |
src/view/utils/createTotalTable.ts |
- Added headers: unreviewedPrsHeader , unapprovedPrsHeader . Modified PR size calculation formula. |
src/view/utils/index.ts |
- Added export: createDependencyMarkdown from ./createDependencyMarkdown . |
PullRequestTimelineInfo
type in src/converters/types.ts
are related to the modifications made to the Collection
type in the main PR, as both involve enhancements to the data structures that track pull request metrics.🐰 In the burrow where code does play,
New metrics hop and dance today.
With sizes tracked and graphs to show,
Pull requests bloom, watch them grow!
Unreviewed and unapproved, we cheer,
A brighter path for all, oh dear! 🌼
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?
@coderabbitai review
Pull Request
Description
contribution
table.Type of Change
How Has This Been Tested?
Used for different months and teams.
Checklist:
Summary by CodeRabbit
Release Notes
New Features
unreviewed
andunapproved
counts.Bug Fixes
Documentation
Refactor