Answer stability round 2: 0 🔴, 1 🟡 (0 misread); a test of the last poll, early returns in pushed, a plainer gh row match
This commit is contained in:
@@ -379,11 +379,15 @@ def pushed(run: Run, config: Config, sleep: typing.Callable[[float], None]) -> s
|
||||
if isinstance(sent, Failure):
|
||||
return sent
|
||||
comment = review_comment(run, config)
|
||||
number = None if comment is None or isinstance(comment, Failure) else shown_pull(forge, branch, head, run, sleep)
|
||||
if isinstance(comment, Failure):
|
||||
return Failure(f"pushed {branch}, but could not ask for a review: {comment.reason}")
|
||||
if isinstance(number, Failure) or number is None or comment is None:
|
||||
return number if isinstance(number, Failure) else f"Pushed {branch}."
|
||||
if comment is None:
|
||||
return f"Pushed {branch}."
|
||||
number = shown_pull(forge, branch, head, run, sleep)
|
||||
if number is None:
|
||||
return f"Pushed {branch}."
|
||||
if isinstance(number, Failure):
|
||||
return number
|
||||
made = comment_on(forge, number, comment, run)
|
||||
return Failure(f"pushed {branch}, but could not ask for a review: {made.reason}") if isinstance(made, Failure) else f"Pushed {branch}, and asked for a review of pull request #{number} with “{comment}”."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user