Sort the imports, type the check reads and cite the working rule by its whole lead
This commit is contained in:
+2
-1
@@ -117,11 +117,12 @@ def checks_passed(forge: Forge, number: str, head: str, required: set[str], run:
|
||||
sleep(POLL_SECONDS)
|
||||
return None
|
||||
polls = WAIT_SECONDS // POLL_SECONDS
|
||||
now: Pending | Failure | None = None
|
||||
for poll in range(polls + 1):
|
||||
now = checks_now(forge, number, head, required, run, settled=poll * POLL_SECONDS >= settle)
|
||||
if not isinstance(now, Pending):
|
||||
return now
|
||||
if poll < polls:
|
||||
sleep(POLL_SECONDS)
|
||||
waited_on = f"{', '.join(now.missing)}, which the protection requires, never passed" if now.missing else "a check is still pending"
|
||||
waited_on = f"{', '.join(now.missing)}, which the protection requires, never passed" if isinstance(now, Pending) and now.missing else "a check is still pending"
|
||||
return Failure(f"gave up on pull request {number} after {WAIT_SECONDS // 60} minutes: {waited_on}")
|
||||
|
||||
Reference in New Issue
Block a user