Chaosthebot / Chaos

A social coding experiment that updates its own code democratically.
http://chaosthebot.com
MIT License
2.44k stars 210 forks source link

[WIP] brainstorming for /vote fast + prototype [WILL NOT BE UN-WIP-ED] #493

Closed mark-i-m closed 6 years ago

mark-i-m commented 7 years ago

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.

mark-i-m commented 7 years ago

Useful links:

https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue

https://developer.github.com/v3/pulls/#get-a-single-pull-request

anythingbot commented 7 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.

mdcfe commented 7 years ago

@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.

rudehn commented 7 years ago

@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.

Ajedi32 commented 7 years ago

Wait, does chaosbot avoid automatically merging [WIP] PRs? I didn't realize that was something it did.

rudehn commented 7 years ago

Yep. If it has WIP it will not be merged

rudehn commented 7 years ago

DB is in, this can be finished

mark-i-m commented 7 years ago

@rudehn Can you confirm that I am not messing up the database stuff?

rudehn commented 7 years ago

Walk me through what you are trying to do. What does /vote fast do?

mark-i-m commented 7 years ago

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.

PlasmaPower commented 7 years ago

@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?

dbpokorny commented 7 years ago

@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.

PlasmaPower commented 7 years ago

@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.

mark-i-m commented 7 years ago

Adding the label does sound like a good way of visually differentiating fast PRs on the PR list, though...

dbpokorny commented 7 years ago

@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?

PlasmaPower commented 7 years ago

@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.

dbpokorny commented 7 years ago

@PlasmaPower pull what info from the database? I don't understand what that is

mark-i-m commented 7 years ago

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...

mark-i-m commented 7 years ago

Will be back tomorrow :zzz:

mark-i-m commented 7 years ago

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 fasted, then the mertiocracy should be aware of it. Otherwise, I think it will just get abused.

PlasmaPower commented 7 years ago

First issues to fix should be Travis. There are some undefined names and such.

PlasmaPower commented 7 years ago

This code should also be changed to use the get_meritocracy function (maybe move it into a more general file).

mark-i-m commented 6 years ago

I would like to close this PR to clean up my dashboard. Does anyone have objections?

mdcfe commented 6 years ago

As with the other issue, no objection here.