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

Only admin can generate rewards non collaboratively #160

Closed
0x4007 opened this issue Oct 16, 2024 · 11 comments · Fixed by #182
Closed

Only admin can generate rewards non collaboratively #160

0x4007 opened this issue Oct 16, 2024 · 11 comments · Fixed by #182

Comments

@0x4007
Copy link
Member

0x4007 commented Oct 16, 2024

Occasionally there are instances where trusted contributors:

  1. File the spec
  2. Price the issue (they add both time and priority)
  3. Self assign
  4. Self merge.
    If theres no other collaborator involved in any part of this process, we should refuse to generate the reward until somebody else steps in to reopen and close at least.
    Unfortunately after the pull is merged we cant leave a review state other than commented, and it doesnt make sense to change the labels or spec either.

Only admins and billing managers should have this capability. I definitely need it for demo purposes when pitching.

@ishowvel
Copy link
Contributor

ishowvel commented Nov 5, 2024

Don't you have to be an admin to set price and time priority.
Also would a valid fix to not generate rewards if the event actor of the issue closer is the same as the assignee and the price was also set by the assignee

@ishowvel
Copy link
Contributor

ishowvel commented Nov 7, 2024

/start

Copy link

Deadline Thu, Nov 7, 9:27 AM UTC
Beneficiary 0x340D8d2bd82dEb4f485623453c9F6ad307e6B027

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.

@0x4007
Copy link
Member Author

0x4007 commented Nov 8, 2024

Don't you have to be an admin to set price and time priority.

Any collaborator can set a label

Also would a valid fix to not generate rewards if the event actor of the issue closer is the same as the assignee and the price was also set by the assignee

This is unclear but throw an error when the author closes the issue, and they are not an admin/billing_manager

We should also check that a collaborator approved the pull review. If so then we can make an exception and generate rewards

@ishowvel
Copy link
Contributor

ishowvel commented Nov 8, 2024

Don't you have to be an admin to set price and time priority.

Any collaborator can set a label

Also would a valid fix to not generate rewards if the event actor of the issue closer is the same as the assignee and the price was also set by the assignee

This is unclear but throw an error when the author closes the issue, and they are not an admin/billing_manager

I chose to just not generate a permit if the issue author and assignee are the same and issue the author himself as closed the issue as completed (the issue author also set the pricing labels)

@ishowvel
Copy link
Contributor

ishowvel commented Dec 1, 2024

/help

1 similar comment
@ishowvel
Copy link
Contributor

ishowvel commented Dec 3, 2024

/help

Copy link

Available Commands

Command Description Example
/help List all available commands. /help
/allow Allows the user to modify the given label type. /allow @user1 label
/ask Ask any question about the repository, issue or pull request /ask
/query Returns the user's wallet, access, and multiplier information. /query @UbiquityOS
/start Assign yourself and/or others to the issue/task. /start
/stop Unassign yourself from the issue/task. /stop
/wallet Register your wallet address for payments. /wallet ubq.eth

Copy link

Note

The following contributors may be suitable for this task:

rndquu

1% Match ubiquity/audit.ubq.fi#16

Copy link

+ Evaluating results. Please wait...

Copy link

 [ 76.95 WXDAI ] 

@ishowvel
Contributions Overview
ViewContributionCountReward
IssueTask175
IssueComment11.95
Conversation Incentives
CommentFormattingRelevancePriorityReward
Don't you have to be an admin to set price and time priority.Al…
2.59
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 46
  wordValue: 0.1
  result: 2.59
131.95

 [ 75 WXDAI ] 

@0x4007
⚠️ Your rewards have been limited to the task price of 75 WXDAI.
Contributions Overview
ViewContributionCountReward
IssueSpecification162.37
IssueComment18.07
ReviewComment610.584
Conversation Incentives
CommentFormattingRelevancePriorityReward
Occasionally there are instances where trusted contributors:1. …
6.93
content:
  content:
    p:
      score: 0
      elementCount: 2
    ol:
      score: 0
      elementCount: 1
    li:
      score: 0.5
      elementCount: 4
    hr:
      score: 0
      elementCount: 1
  result: 2
regex:
  wordCount: 98
  wordValue: 0.1
  result: 4.93
1362.37
Any collaborator can set a label This is unclear but throw an e…
2.69
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 48
  wordValue: 0.1
  result: 2.69
138.07
Seems close but study the code elsewhere to see how we do loggin…
1.38
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 22
  wordValue: 0.1
  result: 1.38
0.732.898
Syntax should be logger.error
0.39
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 5
  wordValue: 0.1
  result: 0.39
0.830.936
We don't use console
0.39
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 5
  wordValue: 0.1
  result: 0.39
0.7530.8775
Doesn't look right. Review the spec carefully. If I authored t…
2.15
content:
  content:
    p:
      score: 0
      elementCount: 2
  result: 0
regex:
  wordCount: 37
  wordValue: 0.1
  result: 2.15
0.6534.1925
Please post QA and prove it works as expected
0.65
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 9
  wordValue: 0.1
  result: 0.65
0.430.78
@gentlementlegen They claim your changes made this harder to tes…
1
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 15
  wordValue: 0.1
  result: 1
0.330.9

 [ 75 WXDAI ] 

@gentlementlegen
⚠️ Your rewards have been limited to the task price of 75 WXDAI.
Contributions Overview
ViewContributionCountReward
ReviewComment23180.336
Conversation Incentives
CommentFormattingRelevancePriorityReward
`_isCollaborative`, `_nonAssigneeApprovedReviews`…
1.22
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 19
  wordValue: 0.1
  result: 1.22
0.832.928
Isn't there any equivalent directly with the rest methods?
0.71
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 10
  wordValue: 0.1
  result: 0.71
0.531.065
you can remove the `else` and just return `true`…
0.65
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 9
  wordValue: 0.1
  result: 0.65
0.731.365
The problem here is that the reviews can still have "APPROVED" s…
8.29
content:
  content:
    p:
      score: 0
      elementCount: 1
    a:
      score: 5
      elementCount: 1
  result: 5
regex:
  wordCount: 61
  wordValue: 0.1
  result: 3.29
0.9323.883
No need to store that in a variable.
0.59
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 8
  wordValue: 0.1
  result: 0.59
0.430.708
Should not need a cast.
0.39
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 5
  wordValue: 0.1
  result: 0.39
0.430.468
You can inline this.
0.32
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 4
  wordValue: 0.1
  result: 0.32
0.630.576
@ishowvel You can just merge the development branch here and you…
1.22
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 19
  wordValue: 0.1
  result: 1.22
0.331.098
@ishowvel please delete the `dist` folder so the binary …
0.83
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 12
  wordValue: 0.1
  result: 0.83
0.531.245
To make sure this compiles, add `"exclude": ["tests"]` i…
1.06
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 16
  wordValue: 0.1
  result: 1.06
0.732.226
@ishowvel Could you please merge the development branch here and…
0.88
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 13
  wordValue: 0.1
  result: 0.88
0.431.056
I tested this, and it does not work as expected. If the permits …
7.49
content:
  content:
    p:
      score: 0
      elementCount: 1
    a:
      score: 5
      elementCount: 1
  result: 5
regex:
  wordCount: 44
  wordValue: 0.1
  result: 2.49
0.6319.482
@ishowvel Token for what purpose? What are you trying to achieve?
0.77
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 11
  wordValue: 0.1
  result: 0.77
0.230.462
Yes you can use your own token for that and set it in the enviro…
1.44
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 23
  wordValue: 0.1
  result: 1.44
0.331.296
You do not have permissions within `ubiquity-os` which i…
1.17
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 18
  wordValue: 0.1
  result: 1.17
0.331.053
@ishowvel What is the difference between the logic you implement…
0.83
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 12
  wordValue: 0.1
  result: 0.83
0.430.996
Check this test here: https://github.com/Meniole/text-conversati…
6.65
content:
  content:
    p:
      score: 0
      elementCount: 2
    a:
      score: 5
      elementCount: 1
  result: 5
regex:
  wordCount: 27
  wordValue: 0.1
  result: 1.65
0.8318.96
@ishowvel I don't think there is a `billing_manager` sta…
1.22
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 19
  wordValue: 0.1
  result: 1.22
0.531.83
@ishowvel I restarted the Jest site and indeed tests work. Howev…
7.15
content:
  content:
    p:
      score: 0
      elementCount: 1
    a:
      score: 5
      elementCount: 1
  result: 5
regex:
  wordCount: 37
  wordValue: 0.1
  result: 2.15
0.6318.87
@ishowvel I am not sure about what you're asking me exactly, the…
2
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 34
  wordValue: 0.1
  result: 2
0.231.2
https://github.com/Meniole/text-conversation-rewards/issues/34…
10
content:
  content:
    p:
      score: 0
      elementCount: 2
    a:
      score: 5
      elementCount: 2
  result: 10
regex:
  wordCount: 0
  wordValue: 0.1
  result: 0
0.1330
@ubiquity-ubiquibot is indeed a collaborator which is why it sho…
2.15
content:
  content:
    p:
      score: 0
      elementCount: 1
  result: 0
regex:
  wordCount: 37
  wordValue: 0.1
  result: 2.15
0.734.515
Seems okhttps://github.com/Meniole/text-conversation-rewards/i…
15.18
content:
  content:
    p:
      score: 0
      elementCount: 4
    a:
      score: 5
      elementCount: 3
  result: 15
regex:
  wordCount: 2
  wordValue: 0.1
  result: 0.18
0.1345.054

@rndquu rndquu removed this from Development Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants