diff --git a/docs/calculations.html b/docs/calculations.html new file mode 100644 index 0000000..09d1dc6 --- /dev/null +++ b/docs/calculations.html @@ -0,0 +1,819 @@ + + +
+ + ++ Understanding the point system, leaderboard rankings, and achievement criteria that power Git Velocity. +
++ Git Velocity calculates developer contributions by analyzing GitHub activity across configured repositories. + The scoring system is designed to encourage well-rounded contributions including code commits, pull requests, + code reviews, and collaboration. +
+Activities earn configurable points
+Combined across all repositories
+Unlock badges for milestones
+How each activity contributes to your score
+Total Score = Commits + Line Changes + PRs + Reviews + Comments + Response Bonus + Out of Hours
+
+Where:
+ Commits = commit_count × 10 points
+ Line Changes = (lines_added × 0.1) + (lines_deleted × 0.05) points
+ PRs = (PRs_opened × 25) + (PRs_merged × 50) points
+ Reviews = reviews_given × 30 points
+ Comments = review_comments × 5 points
+ Response = bonus for fast review response (0-50 points)
+ Out of Hours = commits outside 9am-5pm × 2 points
+
+
+ All point values are configurable in your .git-velocity.yaml file.
+
| Activity | +Points | +Description | +
|---|---|---|
| Commit | +10 | +Per commit pushed | +
| Commit with Tests | +15 | +Commit that includes test files | +
| Lines Added | +0.1 | +Per meaningful line added | +
| Lines Deleted | +0.05 | +Per meaningful line removed | +
| PR Opened | +25 | +Per pull request created | +
| PR Merged | +50 | +Per pull request merged | +
| PR Reviewed | +30 | +Per PR review submitted | +
| Review Comment | +5 | +Per comment on PR reviews | +
| Fast Review (<1h) | +50 | +Bonus for average response under 1 hour | +
| Fast Review (<4h) | +25 | +Bonus for average response under 4 hours | +
| Fast Review (<24h) | +10 | +Bonus for average response under 24 hours | +
| Out of Hours | +2 | +Per commit outside 9am-5pm | +
+ By default, Git Velocity uses meaningful lines instead of raw line counts. + This filters out noise and rewards actual code contributions: +
+
+
+ Disable with use_meaningful_lines: false in config to use raw line counts.
+
How positions are determined
+Metrics from all configured repositories are combined per contributor
+Apply point values to each activity type and sum the breakdown
+Contributors are sorted in descending order by total score
+Each contributor receives a rank (1st, 2nd...) and percentile position
++ Git Velocity tracks top performers in each category: +
+Highest total score
+Most commits
+Most reviews given
+Most PRs opened
++ When teams are configured, Git Velocity calculates team metrics: +
+95 achievements across 22 categories with tiered progression
+Tiers: 1, 10, 50, 100, 500, 1000
+Tiers: 1, 10, 25, 50, 100, 250
+Tiers: 1, 10, 25, 50, 100, 250
+Tiers: 10, 50, 100, 250, 500
+Tiers: 100, 1K, 5K, 10K, 50K
+Tiers: 100, 500, 1K, 5K, 10K
+Tiers: <24h, <4h, <1h
+Tiers: 3, 7, 14, 30 days
+Early Bird, Night Owl, Weekend Warrior
++ Each achievement has a condition type and threshold. + When your metrics meet or exceed the threshold, the achievement is unlocked. +
+| Condition Type | +Metric Checked | +Comparison | +
|---|---|---|
| commit_count | +Total commits | +≥ threshold | +
| pr_opened_count | +PRs opened | +≥ threshold | +
| review_count | +Reviews given | +≥ threshold | +
| avg_review_time_hours | +Average review response | +≤ threshold (lower is better) | +
| longest_streak | +Consecutive active days | +≥ threshold | +
| perfect_prs | +PRs with no changes requested | +≥ threshold | +
| repo_count | +Repositories contributed to | +≥ threshold | +
+ + Achievement definitions are hardcoded and cannot be customized to prevent manipulation. +
++ Most achievements have multiple tiers. As you progress, you unlock higher tiers: +
++ The leaderboard shows only the highest tier achieved per category for each contributor. +
+Where the metrics come from
++ These metrics are calculated from raw data: +
+Parsed from commit diffs, filtering comments/whitespace
+Time between PR creation and first review
+Consecutive days with activity
+PRs merged without "changes requested" reviews
+Commits outside 9am-5pm based on commit timestamp
+Count of distinct PR authors reviewed
++ By default, bot activity is excluded from metrics. The following patterns are automatically filtered: +
+*[bot]
+ dependabot*
+ renovate*
+ github-actions*
+ codecov*
+ snyk*
+ greenkeeper*
+
+
+ Enable with include_bots: true or add custom patterns with additional_bot_patterns.
+
Now that you understand how scoring works, start analyzing your repositories.
+ +
-
-