Closed mark-i-m closed 6 years ago
Downvoting because the code doesn't do anything (aside from create space for some potential future code) and the PR isn't clear enough.
If you make the code do something and the PR says what the code does, then maybe I'll upvote.
some needed functions/methods/utilities that might be needed
I don't even know how the feature is supposed to work, so how a I going to know what functions might be needed? I'd like to evaluate your judgement and design decisions, but I don't know how the feature you want to build works...and you didn't update the code with the feature...so this is all a bit of a mystery.
@anythingbot The proposal for the feature is... wait, he already linked it:
My proposal is here in #401.
This is marked WIP - it's clearly not finished yet, and mark even said that this is only the beginning of the work for it.
@mark-i-m you will need to change the COMMANDS_LIST
variable and add the fast
subcommand to it. Command syntax is checked against whatever is in the commands_list.
Wait, does chaosbot avoid automatically merging [WIP] PRs? I didn't realize that was something it did.
Yep. If it has WIP
it will not be merged
DB is in, this can be finished
@rudehn Can you confirm that I am not messing up the database stuff?
Walk me through what you are trying to do. What does /vote fast
do?
1) When a new PR is created, a meritocrat has 5 min to post a /vote fast
2) If the comment is edited it is ignored
3) If (1) and (2) hold, then a marker is placed on the PR in the db... Specifically, the Issue table is augmented with an "expedited" column.
4) During the PR polling, if the PR (which is an issue w.r.t. github api IIUC) has an "expedited" flag set in its record in the db, then the voting window is halfed.
@mark-i-m Don't you also want to require additional meritocracy reviews? Also, should the author of the PR be able to /vote fast
it?
@mark-i-m this can be done with a mysql database, but this isn't necessary; it can also be done with a github label. That way the bot can check for labels on the PR to see if the "expedited" label is present. If so, the bot cuts the voting window in half.
@dbpokorny That's a great idea! I'm not sure it'll be necessary though, since we do have a DB and an implementation using it.
Adding the label does sound like a good way of visually differentiating fast PRs on the PR list, though...
@PlasmaPower My whole take on expedited PRs is that it effectively turns the chaosbot into a bicameral legislature; so I think either method is fine. Part of the issue here is that using a mysql database doesn't reveal the status of the PR using the github web interface; you'll still have to add the github label in order to signal the status of the PR to github users. So, the thinking goes, if github is going to remember the status, then there isn't any need (on this project) for additional mysql configuration.
I'm under the impression that the only data this database would store is expedited status for each PR. Is that correct?
@dbpokorny That is a good point in favor of a label. I guess we could add a label, but pull the info from the DB. And yes, I think you're correct about the DB model.
@PlasmaPower pull what info from the database? I don't understand what that is
Ok, I think I have code representing roughly what has been discussed above. I really doubt it runs in its current state. Mostly, I would appreciate feedback from reviews about what should be changed. After that, I will fix up broken things and submit a new PR. Think of this PR as pseudocode for the real one...
Will be back tomorrow :zzz:
Also, should the author of the PR be able to /vote fast it?
Sorry, I didn't see this earlier. I don't think so. If it is something that should be /vote fast
ed, then the mertiocracy should be aware of it. Otherwise, I think it will just get abused.
First issues to fix should be Travis. There are some undefined names and such.
This code should also be changed to use the get_meritocracy
function (maybe move it into a more general file).
I would like to close this PR to clean up my dashboard. Does anyone have objections?
As with the other issue, no objection here.
Start work for /vote fast
My proposal is here in #401 .
~This PR is not intended to implement any feature, but to implement some needed functions/methods/utilities that might be needed, and to just plan in general.~
~The actual feature will probably wait for @rudehn's work on database stuff.~
Thoughts and comments appreciated...
EDIT: I added some code to implement this feature now that @rudehn's work is in... I will probably not un-WIP this. Rather, when it looks good, I will create a new PR, so as not to take advantage of those who already voted.