ubiquity-os / plugins-wishlist

0 stars 5 forks source link

Generalized "GitHub Webhook + Contributor Role -> Rewards" No Config v1 #46

Open 0x4007 opened 2 months ago

0x4007 commented 2 months ago

Dynamically map the config property name to count the amount of matching webhook events that occur in the issue/pull timeline, and credit accordingly. In which case, this plugin seems generally useful for mapping any value to any event, in the context of an issue or pull!

All this is intended to do is:

  1. get the timeline of events from the issue and the linked pulls
  2. assign a value of 1 to every event that is counted, per contributor.
  3. return sum totals.

In the next iteration, we should identify the user's "class" (specification author, assignee, collaborator, contributor)

In the final iteration, we should enable config.

Apetree100122 commented 1 month ago

There is a total of 7

0x4007 commented 1 month ago

301 based on a very quick Look

Amit0617 commented 1 month ago

/start

ubiquity-os[bot] commented 1 month ago
! Please set your wallet address with the /wallet command first and try again.
Amit0617 commented 1 month ago

/wallet 0x47c0C4eb25b0Aa4bC5D1E6341F5eE9A6aD2B596c

ubiquity-os[bot] commented 1 month ago

+ Successfully registered wallet address
Amit0617 commented 1 month ago

/start

ubiquity-os[bot] commented 1 month ago
Deadline Fri, Oct 11, 7:06 AM UTC
Beneficiary 0x47c0C4eb25b0Aa4bC5D1E6341F5eE9A6aD2B596c

[!TIP]

  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.
Amit0617 commented 1 month ago

Wanted to be sure about how the pull request is supposed to be created? Should I create a new folder with all files, since there are probably going to be multiple plugins here?

0x4007 commented 1 month ago

It should be one plugin. Fork the plugin template and link your pull here

Amit0617 commented 1 month ago

Somehow I missed that you asked for forking it and github ux recommended me to use that repo as template. I understand, that's not how it should be but currently just sharing it as commit on the repo. I haven't been able to find enough of documentations and did a good amount of guess work looking at type definitions of context. Currently, it is not able to get all the events under an issue, but just would record 1 score for the person who runs a command. https://github.com/Amit0617/github-contributor-rewards/commit/1c89e5f3dda7a623b0136dcf662935a2bb878d60

Amit0617 commented 3 weeks ago

@0x4007 may I ask for reviewing above PR?

0x4007 commented 3 weeks ago

It's closed because you didn't follow the necessary instructions

Amit0617 commented 3 weeks ago

I was asking to review the one opened after the closed one (following instructions as suggested). https://github.com/Amit0617/contributor-rewards/pull/3 particularly

kingsley-einstein commented 3 weeks ago

/wallet 0xb69DB7b7B3aD64d53126DCD1f4D5fBDaea4fF578

ubiquity-os-beta[bot] commented 3 weeks ago
+ Successfully registered wallet address
kingsley-einstein commented 3 weeks ago

/start

ubiquity-os-beta[bot] commented 3 weeks ago
Warning! This task was created over 36 days ago. Please confirm that this issue specification is accurate before starting.
Deadline Fri, Nov 1, 7:08 PM UTC
Beneficiary 0xb69DB7b7B3aD64d53126DCD1f4D5fBDaea4fF578

[!TIP]

  • Use /wallet 0x0000...0000 if you want to update your registered payment wallet address.
  • Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
  • Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.
ubiquity-os-beta[bot] commented 3 weeks ago
! Error: HttpError: Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment
ubiquity-os-beta[bot] commented 3 weeks ago
! Error: HttpError: Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment
0x4007 commented 3 weeks ago

You only need to set it once

/wallet 0xb69DB7b7B3aD64d53126DCD1f4D5fBDaea4fF578

ubiquity-os-beta[bot] commented 3 weeks ago
! Error: HttpError: Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment
kingsley-einstein commented 3 weeks ago

Link to PR: https://github.com/kingsley-einstein/contributions-scan/pull/3

ubiquity-os-beta[bot] commented 3 weeks ago
! Error: HttpError: Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment
kingsley-einstein commented 3 weeks ago

Link to PR: kingsley-einstein/contributions-scan#3

Sorry I closed too many PRs. I saw a comment where the former guy who attempted this was asked to raise PR against his own fork instead.

ubiquity-os-beta[bot] commented 3 weeks ago
! Error: HttpError: Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment
Amit0617 commented 3 weeks ago

“Former guy” is still on it. It was unassigned in miscommunication.

ubiquity-os-beta[bot] commented 3 weeks ago
! Error: HttpError: Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment
kingsley-einstein commented 3 weeks ago

@0x4007 @gentlementlegen

Here's the PR for this: https://github.com/kingsley-einstein/contributions-scan/pull/3

I successfully set up Cloudflare against my own fork.

ubiquity-os-beta[bot] commented 3 weeks ago
! Error: HttpError: Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment
0x4007 commented 2 weeks ago

@EresDev @whilefoo @gentlementlegen can you guys help me test in the pull? It's a bit hard to from mobile. I think it looks mostly good though and I want to merge it soon.

For this step I'm just concerned about the main engine of it working. We can later link it to issue closed event and dynamically calculate everything. We also ideally should allow for more advanced incentive modules inside of this configuration to load in the text-conversation-rewards as advanced logic for comments.

gentlementlegen commented 2 weeks ago

@0x4007 Does this stack on top of the current rewards? What result / workflow do you actually expect with this?

0x4007 commented 2 weeks ago

My previous comment answers that pretty clearly so I don't understand what you're asking.

ubiquity-os-beta[bot] commented 2 weeks ago

@kingsley-einstein, this task has been idle for a while. Please provide an update.

kingsley-einstein commented 2 weeks ago

@kingsley-einstein, this task has been idle for a while. Please provide an update.

On it

EresDev commented 2 weeks ago

@kingsley-einstein Can you share the configs the plugin needs in .ubiquity-os.config.yml? Any env vars?

I have been trying to set it up on my local instance but I am having issues. image

kingsley-einstein commented 2 weeks ago

@kingsley-einstein Can you share the configs the plugin needs in .ubiquity-os.config.yml? Any env vars?

I have been trying to set it up on my local instance but I am having issues. image

@EresDev

You can test directly against the relevant PR, by running the slash command "/scan-contributions". For the env vars, you'll mostly need GITHUB_TOKEN set in a .dev.vars file.

ubiquity-os-beta[bot] commented 2 weeks ago

@kingsley-einstein, this task has been idle for a while. Please provide an update.

kingsley-einstein commented 2 weeks ago

@kingsley-einstein, this task has been idle for a while. Please provide an update.

It's up for review.

gentlementlegen commented 2 weeks ago

@kingsley-einstein Your PR seems to target your own repo somehow, I cannot assign reviewers there.

kingsley-einstein commented 2 weeks ago

@kingsley-einstein Your PR seems to target your own repo somehow, I cannot assign reviewers there.

@gentlementlegen It was forked from the template repo, and I'm not supposed to raise a PR against that repo.

gentlementlegen commented 1 week ago

It doesn't make sense, your PR should be opened against Ubiquity's organization, there should be a repo that would accommodate your changes. If there is none at the moment ask for one to be created.

kingsley-einstein commented 1 week ago

It doesn't make sense, your PR should be opened against Ubiquity's organization, there should be a repo that would accommodate your changes. If there is none at the moment ask for one to be created.

@gentlementlegen I know that now. Could one be created now, so I switch origins locally, and commit my changes?

EresDev commented 1 week ago

You can test directly against the relevant PR, by running the slash command "/scan-contributions". For the env vars, you'll mostly need GITHUB_TOKEN set in a .dev.vars file.

I tried adding github token, but the issues are still there.

It turned out manifest file isn't being served correctly but the plugin should work smoothly with ubuiquity-os-kernel instances. I fixed manifest file issue and then the event being passed is null. So, it needs some attention to work smoothly with kernel as plugins are supposed to. Maybe try setting up a local instance to debug? Testing it only in your PR is helpful but it isn't sufficient.

kingsley-einstein commented 1 week ago

You can test directly against the relevant PR, by running the slash command "/scan-contributions". For the env vars, you'll mostly need GITHUB_TOKEN set in a .dev.vars file.

I tried adding github token, but the issues are still there.

It turned out manifest file isn't being served correctly but the plugin should work smoothly with ubuiquity-os-kernel instances. I fixed manifest file issue and then the event being passed is null. So, it needs some attention to work smoothly with kernel as plugins are supposed to. Maybe try setting up a local instance to debug? Testing it only in your PR is helpful but it isn't sufficient.

@EresDev The task relies on just listening for issue comments, not all kinds of events. Also, to get it to work, you must send a payload with the same structure as Github event payloads.

EresDev commented 1 week ago

The task relies on just listening for issue comments, not all kinds of events.

Yes, the event I am trying is issue_comment.created and it is having problems in processing it.. The event is passed from github, so yes it is a real GitHub event payload. Only difference from your setup is that I have kernel, and plugin running on my local machine. I am testing here.

Keyrxng commented 1 week ago

@0x4007 @gentlementlegen @EresDev

I already built this plugin and met the targets of each spec for the whole parent task including unit tests.

The org repo was deleted and my PR along with it for some reason before the task was broken into four steps.

I'd like to submit my plugin for consideration for these tasks considering I already put in the work and the PR was received well at the time and is ready to go.

  1. This plugin would sooner be live.
  2. My efforts would not have gone to waste and no-one need waste any more of theirs unnecessarily (both reviewers and contributors)
0x4007 commented 1 week ago

@0x4007 @gentlementlegen @EresDev

I already built this plugin and met the targets of each spec for the whole parent task including unit tests.

The org repo was deleted and my PR along with it for some reason before the task was broken into four steps.

I'd like to submit my plugin for consideration for these tasks considering I already put in the work and the PR was received well at the time and is ready to go.

  1. This plugin would sooner be live.

  2. My efforts would not have gone to waste and no-one need waste any more of theirs unnecessarily (both reviewers and contributors)

If it works according to the spec and you can prove it then sure. Although we would probably need to recreate the issue because a lot of conversation that doesn't belong under the issue happened here.

ubiquity-os-beta[bot] commented 1 week ago

@kingsley-einstein, this task has been idle for a while. Please provide an update.

kingsley-einstein commented 1 week ago

@kingsley-einstein, this task has been idle for a while. Please provide an update.

It's under review