-
Notifications
You must be signed in to change notification settings - Fork 105
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
Introduce more sophisticated approval rights #93
Comments
The best would be if the bot would support to declare some kind of lambda function. So, that we can implement the logic here in the repo. |
Hi Basti! We have been discussing on how to appropriately handle this case. Instead of a lambda function (which can be a security risk), we were thinking about an array that claims the voting power of each dan. E.g.: dan1: 1
dan2: 2
dan3: 5
dan4: 7
dan5: 10
dan6: 15 and each rule has a requirement level of approval. For example, CI files would have a requirement of 14 points, which could be fulfilled by one approval of dan6 or a different combination. This voting power would be in the Let me know what you think! |
@bkchr could you provide a feedback or may be ping other people who could also comment on this? |
Sounds good, but it should also include the possibility to require that at least X from rank Y have approved. |
Hi @bkchr! I have been thinking on how to approach the given request. I have the following proposal: Let's use my idea from before and say we have a field where we define the value of all the ranks, and then we set up the minimum amount of approvals of a given rank, and the minimum "score" it must have for it to pass. For example: score:
dan1: 1
dan2: 2
dan3: 5
dan4: 9
dan5: 10
dan6: 15
rules:
- name: CI Files
condition:
include:
- ^\.github/.*
type: fellows
minRank: 3
minApprovals: 1
minScore: 18 This would work in the following way:
So, in this case, your vote, as a dan 6, would count 15 points. And we would still need 3 more points. Could either be from:
Of course you can define the value of each dan as you see fit. Let me know if you think this will fulfill the requirement you have with enough flexibility so I can get started on it. |
Sounds good! :) |
Perfect. I have created a related issue to keep track of the development: paritytech/review-bot#110 Once it is ready, I'll update the version in this repo 🙂 |
PR #168 has been opened which resolves this issue. |
Updated Review Bot to version 2.4.0 which contains paritytech/review-bot#110 (solved in paritytech/review-bot#113) This resolves #93 Updated review bot to latest version which brings new changes to the fellow object: Added new optional field to the config named `scores` that has the score of each fellow per dan (added up to dan IX). When the rule of type `fellows` has the optional field of `minTotalScore` it will check that the score of the fellows who approved the PR sums up to that number. If it doesn't sum to that number it will fail with a custom error listing the score of each fellow for reference (and saying how many points are missing). Find a complete explanation of the new configuration here: [Fellows Rule](/~https://github.com/paritytech/review-bot/blob/v2.4.0/README.md#fellows-rule) - [x] Does not require a CHANGELOG entry I also added some scores to all the dans (feel free to modify them) and updated the `Relay and system files` rule to have a minimum score of 6.
Yeah! Thank you! |
Currently the approval rights allow to only specify a minimum rank and the number of approvals required to approve a pull request. While this is working, it is not "very inviting" as lower ranks are not incentivized to even review/approve. However on the other side it is sometimes hard to "cat herd" to get everyone together for reviewing/approval. Thus, we should improve the approval bot to have some sort of "voting power". This voting power should be similar to how on chain voting is done. Every rank gets a certain voting power and we will then require X amount of voting power to approve a pull request. Thus, we could for example have that 3 rank II members together have the same voting power as one rank III member.
CC @Bullrich
The text was updated successfully, but these errors were encountered: