Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalized "GitHub Webhook + Contributor Role -> Rewards" With Config v3 #47

Open
Tracked by #22
0x4007 opened this issue Sep 25, 2024 · 0 comments
Open
Tracked by #22

Comments

@0x4007
Copy link
Member

0x4007 commented Sep 25, 2024

This is the original specification, but I realized that this might be a bit ambitious in a single shot, so we'll work on adding the ability to configure it in v2.

Builds upon #46, #48

We need to discuss the final config schema but below is an early draft to start the ideation from

Draft Schemas

  • I am working on designing the config schema, and I wonder if it makes more sense to have two seperate plugins, one for issues only, and one for pulls only. Here I have a single plugin handling both, but perhaps the config can get a bit verbose and messy?

Heres a small example of a single (issue or pull) handler plugin config schema, which seems neat:

pull_request: 
    assigned: 
      targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
      value: 0

Below is handling both

pull_request: 
    assigned: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    auto_merge_disabled: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    auto_merge_enabled: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    closed: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    converted_to_draft: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    demilestoned: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    dequeued: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    edited: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    enqueued: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    labeled: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    locked: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    milestoned: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    opened: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    ready_for_review: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    reopened: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    review_request_removed: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    review_requested: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    synchronize: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    unassigned: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    unlabeled: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    unlocked: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0

pull_request_review: 
    dismissed: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    edited: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    submitted: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0

pull_request_review_comment: 
    created: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    deleted: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    edited: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0

pull_request_review_thread: 
    resolved: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    unresolved: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0

push: 
    pull: 
      targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
      value: 0
    issue: 
      targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
      value: 0

commit_comment: 
    created: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0

issue_comment: 
    created: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    deleted: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    edited: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0

workflow_run: 
    completed: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    in_progress: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    requested: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0

workflow_dispatch: 
    pull: 
      targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
      value: 0
    issue: 
      targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
      value: 0

check_run: 
    completed: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    created: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    requested_action: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    rerequested: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0

check_suite: 
    completed: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    requested: 
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
    rerequested:
        pull: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
        issue: 
          targets: [ ISSUER, ASSIGNEE, COLLABORATOR, CONTRIBUTOR ]
          value: 0
@0x4007 0x4007 changed the title Generalized "GitHub Webhook + Contributor Role -> Rewards" With Config v2 Generalized "GitHub Webhook + Contributor Role -> Rewards" With Config v3 Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant