Skip to content

feat(maintainer): add composite trust score badge#659

Open
RutujaGharat-11 wants to merge 2 commits into
Coder-s-OG-s:mainfrom
RutujaGharat-11:main
Open

feat(maintainer): add composite trust score badge#659
RutujaGharat-11 wants to merge 2 commits into
Coder-s-OG-s:mainfrom
RutujaGharat-11:main

Conversation

@RutujaGharat-11

Copy link
Copy Markdown

Summary

Implements a composite Trust Score badge for PR authors.

Changes

  • Added a pure computeTrustScore() utility with a weighted scoring formula.
  • Added unit tests covering normalization, bounds, weighting, and rounding.
  • Computed the trust score on the server side.
  • Added authorTrustScore to the maintainer queue model.
  • Updated the maintainer dashboard to display a single Trust {score} badge instead of separate Level, XP, and Merged PR indicators.
  • Updated related queue tests to match the new data model.

Closes #454

Copilot AI review requested due to automatic review settings July 10, 2026 15:20
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 authorTrustScore server-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.

Comment thread src/lib/maintainer/trust.ts
Comment thread src/lib/maintainer/trust.test.ts Outdated
Comment thread src/app/actions/maintainer/queue.ts
Comment thread src/app/actions/maintainer/analytics.ts
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jakharmonika364

Copy link
Copy Markdown
Collaborator

can you please fix the conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Composite trust score badge for PR authors

3 participants