Skip to content

feat: multi-contributor bounty payout distribution#15

Open
hanwucui wants to merge 1 commit into
skndash96:mainfrom
hanwucui:feat/multi-contributor-payout
Open

feat: multi-contributor bounty payout distribution#15
hanwucui wants to merge 1 commit into
skndash96:mainfrom
hanwucui:feat/multi-contributor-payout

Conversation

@hanwucui
Copy link
Copy Markdown

Summary

Parses Co-authored-by: trailers from merged PRs and splits bounty payouts equally among all contributors.

Changes

  • New lib/bounty/coauthors.ts — parse co-author trailers from PR body, extract GitHub usernames from noreply emails, deduplicate
  • DB migration — adds winning_pr_coauthors jsonb column to �ounties table
  • PR merge handler — extracts and stores co-authors when PR is merged
  • Payout service — new
    esolveAndPayoutMulti() for equal split (remainder to PR author)
  • Approve payout — branches on single vs multi-contributor; creates separate payout/activity events per contributor
  • Ledger comment — shows all contributors and per-person split in GitHub locked comment
  • UI — bounty detail page shows co-authors and split info; activity feed shows split amounts
  • Types — BountyDetail and database types updated

Design Decisions

  • Backward compatible — single-author PRs follow the exact same code path
  • Equal split with rounding remainder to PR author
  • GitHub username required for co-authors (derived from noreply addresses)
  • Per-contributor audit trail via separate payout_events and activity_events rows

Closes #12

Parse Co-authored-by trailers from merged PRs and split bounty
payouts equally among all contributors.

Changes:
- New lib/bounty/coauthors.ts: parse co-author trailers from PR body
- DB migration: add winning_pr_coauthors jsonb column to bounties
- pr-closed.ts: extract and store co-authors on PR merge
- payout.ts: new resolveAndPayoutMulti() for equal split
- approve-payout.ts: branch single vs multi-contributor payout
- ledger.ts: show all contributors and per-person split in comments
- UI: bounty detail shows co-authors and split info
- Types: BountyDetail and database types updated

Closes skndash96#12
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

@hanwucui is attempting to deploy a commit to the skndash96's projects Team on Vercel.

A member of the Team first needs to authorize it.

@bountic-bot
Copy link
Copy Markdown

bountic-bot Bot commented Apr 29, 2026

⚡️ Bounty Competition Started

@hanwucui has submitted a PR that references an issue with a bounty. Learn more about this bounty: https://bountic.vercel.app/b/skndash96/bountic/issues/12

When this PR is merged, the bounty will be locked and ready for payout approval.


Bountic: Autonomous USDC bounties for open source

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Multiple PR contributors payout distribution

1 participant