apply 7 day rule to formal-vote items
Ensure that the charter rule that formal-vote items stay open at least 7 days is applied. This change interprets that rule to mean that if the majority votes in favor of a change within the 7 day period, the 3 day waiting period will include any of the remaining 7 days. So if the majority is reached on day 1, the patch must stay open 7 days and if the majority is reached on day 7 the patch must stay open an additional 3 days. Change-Id: I48841570ff19b779b2e35de8218a8f56b408df92 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
ff98390399
commit
f4d8b7ff5d
|
@ -215,10 +215,17 @@ def get_one_status(change, delegates):
|
|||
# At least 5 positive votes and more positive than negative
|
||||
# votes.
|
||||
votes_to_approve = (votes[1] >= 5 and votes[1] > votes[-1])
|
||||
|
||||
# Wait at least 3 days after reaching majority.
|
||||
reached_majority = when_majority(change, 5)
|
||||
if reached_majority:
|
||||
|
||||
parts.append('last change on {}'.format(latest_created.date()))
|
||||
|
||||
# At least 7 days old.
|
||||
if age < datetime.timedelta(8):
|
||||
time_to_approve = False
|
||||
parts.append('has not been open 7 days')
|
||||
earliest = str(latest_created.date() + datetime.timedelta(8))
|
||||
elif reached_majority:
|
||||
# Wait at least 3 days after reaching majority.
|
||||
earliest = str(reached_majority.date() + datetime.timedelta(4))
|
||||
since_majority = now.date() - reached_majority.date()
|
||||
time_to_approve = since_majority > datetime.timedelta(3)
|
||||
|
|
Loading…
Reference in New Issue