Implement label-based point system for leaderboard - #7
Merged
Adez017 merged 2 commits intoSep 30, 2025
Conversation
Co-authored-by: Adez017 <142787780+Adez017@users.noreply.github.com>
Copilot
AI
changed the title
in the leaderboard we want the follwoing changes :
1. instaed of 10 points to each pr , check if the pr has label as
Implement label-based point system for leaderboard
Sep 30, 2025
recode and also
if labels as level 1 10
level 2 30 points
level 3 50 points
also make sure didnt made any unnecessary changes
Adez017
marked this pull request as ready for review
September 30, 2025 19:20
|
🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. I would be grateful if you can nominate for keeping this opensource project live and running Link to Nominate. Please do star the repo and Keep up the fantastic work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements a label-based point system for the leaderboard, replacing the previous flat 10-points-per-PR calculation with a level-based scoring mechanism that better reflects the complexity and value of contributions.
Changes
Previous Behavior
All merged PRs received a fixed 10 points regardless of their complexity, difficulty, or scope.
New Behavior
PRs now earn points based on their labels:
recodelabel to earn any pointslevel 1→ 10 pointslevel 2→ 30 pointslevel 3→ 50 pointsImplementation Details
PullRequestIteminterface to capture labels from the GitHub APIcalculatePointsForPR()function that:recodelabelpointsfield toPRDetailsinterface to store calculated points per PRExample
Benefits
✅ Fairer representation of contribution value
✅ Incentivizes proper PR labeling by maintainers
✅ Rewards challenging work appropriately
✅ Backward compatible - no breaking changes
✅ Minimal code changes - surgical implementation in a single file
Technical Notes
Testing
Verified with comprehensive test cases covering:
Closes #[issue_number]
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.