feat(maintainer): add composite trust score badge#659
Open
RutujaGharat-11 wants to merge 2 commits into
Open
Conversation
Contributor
|
@RutujaGharat-11 is attempting to deploy a commit to the codersogs-3057's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
This PR introduces a single composite “Trust {score}” badge for PR authors in the maintainer queue by adding a server-computed trust score derived from author level, XP, merged PR count, and account age.
Changes:
- Added
computeTrustScore()utility (0–100) with unit tests validating normalization, weighting, and rounding. - Computed and attached
authorTrustScoreserver-side when building maintainer queue rows and CSV export rows. - Updated the maintainer dashboard UI to render one “Trust {score}” badge instead of separate Level/XP/Merged indicators.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/maintainer/trust.ts | Adds pure trust-score computation utility with a weighted formula. |
| src/lib/maintainer/trust.test.ts | Adds unit tests for the trust-score utility. |
| src/lib/maintainer/queue.ts | Extends MaintainerPrRow to include authorTrustScore. |
| src/lib/maintainer/queue.test.ts | Updates queue test helpers for the new row shape. |
| src/app/actions/maintainer/queue.ts | Computes and populates authorTrustScore for queue rows from profile + derived metrics. |
| src/app/actions/maintainer/analytics.ts | Computes and populates authorTrustScore for CSV export rows. |
| src/app/(app)/maintainer/page.tsx | Updates UI to display a single “Trust {score}” badge. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Collaborator
|
can you please fix the conflict |
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.
Summary
Implements a composite Trust Score badge for PR authors.
Changes
computeTrustScore()utility with a weighted scoring formula.authorTrustScoreto the maintainer queue model.Trust {score}badge instead of separate Level, XP, and Merged PR indicators.Closes #454