ubiquibot / command-start-stop

Manager user commands to assign / un-assign themselves to tasks.
0 stars 10 forks source link

Properly handle task limit #28

Open whilefoo opened 2 weeks ago

whilefoo commented 2 weeks ago
          The original implementation allowed for productive contributors to work on two tasks concurrently. With a starting two task limit:
Condition Task Adjustment Explanation
If any reviewer approved the pull +1 task per pull It's likely that the pull is good, just waiting on other slow reviewers to confirm.
If reviewers take longer than 24 hours +1 task per pull Don't wait for lazy reviewers to be able to start a new task.
If any reviewer requested changes -1 task per pull They should focus on addressing the changes as a top priority.

_Originally posted by @0x4007 in https://github.com/ubiquibot/command-start-stop/pull/19#discussion_r1731441502_

For the sake of this conversation a completed PR is when the conditions are met in the above table.

In the current state the code checks if any review is approved or if there is 0 reviews but 24 hours have passed since the creation of the PR, however it doesn't check if there's any requested changes so it will count it as completed even if there 1 approve and 1 requested changes.

There is still a problem when the reviewer requests changes and the contributor resolves those changes but waits for the reviewer to make a new review so they can't start another task. There's two possible solutions: check if the reviewer was requested more than x hours ago or check that changes have been marked as solved