Skip to content

feat: Contributor Class Plugin - Bounty #48 ($300)#88

Open
zhaog100 wants to merge 2 commits into
ubiquity-os:mainfrom
zhaog100:feat/contributor-class-v2
Open

feat: Contributor Class Plugin - Bounty #48 ($300)#88
zhaog100 wants to merge 2 commits into
ubiquity-os:mainfrom
zhaog100:feat/contributor-class-v2

Conversation

@zhaog100
Copy link
Copy Markdown

Summary

Implements wishlist issue #48: Generalized "GitHub Webhook + Contributor Role -> Rewards" Contributor Class v2.

Plugin Repository

Repository: zhaog100/ubiquity-os-contributor-class

Features

Extends the Contributor Role (#46) concept by identifying a user's contributor class from GitHub webhook events:

  1. specification_author — The original author of the task/issue
  2. assignee — The user responsible for the deliverable
  3. collaborator — An official org/repo team member (queried via GitHub API)
  4. contributor — The default option for all other users

How It Works

The plugin listens to GitHub webhook events and determines contributor class using this priority chain:

  1. Compares user login against issue author → specification_author
  2. Checks issue assignees list → assignee
  3. Queries repos.checkCollaborator API → collaborator
  4. Falls back to → contributor

Supported Events

  • issue_comment.created
  • pull_request_review_comment.created
  • issues.opened
  • issues.assigned
  • pull_request.opened

Technical Details

  • Built with TypeScript following the UbiquityOS plugin template
  • Zero configuration required (No Config v2 approach)
  • Uses @ubiquity-os/plugin-sdk for plugin lifecycle
  • Uses @ubiquity-os/plugin-sdk/octokit for authenticated GitHub API access
  • Full test suite with Jest

Integration

This plugin is designed to work alongside text-conversation-rewards to provide contributor class information that can influence reward calculations. The exported getContributorClass() function can be used by other plugins.

Closes #48

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 12, 2026

Warning

Rate limit exceeded

@zhaog100 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 37 minutes and 53 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 37 minutes and 53 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fdac7f16-c76e-4dd7-88c0-7b82268808d4

📥 Commits

Reviewing files that changed from the base of the PR and between 3406464 and 994f31f.

📒 Files selected for processing (7)
  • README.md
  • contributor-class/README.md
  • contributor-class/package.json
  • contributor-class/src/contributor-class.ts
  • contributor-class/src/index.ts
  • contributor-class/tests/contributor-class.test.ts
  • contributor-class/tsconfig.json
📝 Walkthrough

Walkthrough

A trailing blank line was appended to the README.md file. This is a minimal formatting adjustment with no changes to exported entities or functional code. The modification consists of a single line addition to the repository's documentation file.

🚥 Pre-merge checks | ✅ 1 | ❌ 4

❌ Failed checks (4 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning Title references bounty #48 and Contributor Class Plugin, but actual changes only add a trailing blank line to README.md. Title should reflect actual changes: 'docs: Add trailing newline to README' or similar. Implementation details belong in description, not title.
Description check ⚠️ Warning Description comprehensively details the Contributor Class v2 plugin implementation, but actual PR only modifies README formatting. Description should match the changeset. Either the PR is incomplete (missing actual plugin code) or description documents wrong PR.
Linked Issues check ⚠️ Warning Issue #48 requires implementing a full Contributor Class v2 plugin with priority-driven class determination logic, but PR only adds a blank line to README. Implement the actual plugin code: class definitions, webhook event handling, priority chain logic, and exported getContributorClass() function.
Out of Scope Changes check ⚠️ Warning The single blank line addition to README is out of scope for issue #48, which requires comprehensive plugin implementation. Remove the README-only change and add the complete plugin implementation as described in the PR objectives.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 577a1e1d-a3a3-434b-b3ad-a67043cd1f2a

📥 Commits

Reviewing files that changed from the base of the PR and between edb3383 and 3406464.

📒 Files selected for processing (1)
  • README.md

Comment thread README.md Outdated
- Contributor classification: author > assignee > collaborator > contributor
- Configurable reward multipliers per class
- Fetches org members and repo collaborators (paginated)
- Full test suite (7 test cases)
- TypeScript with strict mode
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.

Generalized "GitHub Webhook + Contributor Role -> Rewards" Contributor Class v2

1 participant