Skip to content

Mentor verification flow - L2+ can approve PRs from inside the app #88

@Ayush-Patel-56

Description

@Ayush-Patel-56

Problem

Right now mentor verification happens as a side effect of a GitHub review, detected by the webhook. There's no in-app flow for a mentor to explicitly verify a PR without going to GitHub.

What to build

On the maintainer PR queue and on the contributor's 'My Work' section, L2+ users should see a 'Verify' button on PRs that are linked and unverified. Clicking it:

  1. Calls a server action that sets mentor_verified = true and mentor_reviewer_id = user.id on the PR
  2. Awards XP to the mentor (same as a GitHub review would)
  3. Creates an xp_events entry for audit trail
  4. Shows feedback to the mentor confirming the action

Access control

  • Only users with level >= 2 can call the verify action
  • A mentor can't verify their own PR
  • Can't verify an already-verified PR

Where

  • New server action in src/app/actions/maintainer.ts or a new src/app/actions/mentor.ts
  • UI in src/app/(app)/issues/my-work-section.tsx and src/app/(maintainer)/maintainer/pr-queue/page.tsx

Notes

  • This is a meaningful feature - keep the XP award logic consistent with what the webhook does
  • Check src/inngest/functions/process-review-event.ts to see the current flow

Metadata

Metadata

Assignees

Labels

GSSOC26GirlScript Summer of Code 2026backendBackend / API / DB relatedenhancementNew feature or requestfrontendFrontend / UI related

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions